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)
1697
1697
priv -> clone = new_clone ;
1698
1698
}
1699
1699
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
+
1700
1711
static void nft_pipapo_abort (const struct nft_set * set )
1701
1712
{
1702
1713
struct nft_pipapo * priv = nft_set_priv (set );
@@ -1705,7 +1716,7 @@ static void nft_pipapo_abort(const struct nft_set *set)
1705
1716
if (!priv -> dirty )
1706
1717
return ;
1707
1718
1708
- m = rcu_dereference (priv -> match );
1719
+ m = rcu_dereference_protected (priv -> match , nft_pipapo_transaction_mutex_held ( set ) );
1709
1720
1710
1721
new_clone = pipapo_clone (m );
1711
1722
if (IS_ERR (new_clone ))
You can’t perform that action at this time.
0 commit comments