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 @@ -1697,6 +1697,17 @@ static void nft_pipapo_commit(const struct nft_set *set)
16971697 priv -> clone = new_clone ;
16981698}
16991699
1700+ static bool nft_pipapo_transaction_mutex_held (const struct nft_set * set )
1701+ {
1702+ #ifdef CONFIG_PROVE_LOCKING
1703+ const struct net * net = read_pnet (& set -> net );
1704+
1705+ return lockdep_is_held (& nft_pernet (net )-> commit_mutex );
1706+ #else
1707+ return true;
1708+ #endif
1709+ }
1710+
17001711static void nft_pipapo_abort (const struct nft_set * set )
17011712{
17021713 struct nft_pipapo * priv = nft_set_priv (set );
@@ -1705,7 +1716,7 @@ static void nft_pipapo_abort(const struct nft_set *set)
17051716 if (!priv -> dirty )
17061717 return ;
17071718
1708- m = rcu_dereference (priv -> match );
1719+ m = rcu_dereference_protected (priv -> match , nft_pipapo_transaction_mutex_held ( set ) );
17091720
17101721 new_clone = pipapo_clone (m );
17111722 if (IS_ERR (new_clone ))
You can’t perform that action at this time.
0 commit comments