File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -1698,6 +1698,17 @@ static void nft_pipapo_commit(const struct nft_set *set)
16981698 priv -> clone = new_clone ;
16991699}
17001700
1701+ static bool nft_pipapo_transaction_mutex_held (const struct nft_set * set )
1702+ {
1703+ #ifdef CONFIG_PROVE_LOCKING
1704+ const struct net * net = read_pnet (& set -> net );
1705+
1706+ return lockdep_is_held (& nft_pernet (net )-> commit_mutex );
1707+ #else
1708+ return true;
1709+ #endif
1710+ }
1711+
17011712static void nft_pipapo_abort (const struct nft_set * set )
17021713{
17031714 struct nft_pipapo * priv = nft_set_priv (set );
@@ -1706,7 +1717,7 @@ static void nft_pipapo_abort(const struct nft_set *set)
17061717 if (!priv -> dirty )
17071718 return ;
17081719
1709- m = rcu_dereference (priv -> match );
1720+ m = rcu_dereference_protected (priv -> match , nft_pipapo_transaction_mutex_held ( set ) );
17101721
17111722 new_clone = pipapo_clone (m );
17121723 if (IS_ERR (new_clone ))
You can’t perform that action at this time.
0 commit comments