diff options
| author | Florian Westphal <[email protected]> | 2019-01-14 14:28:50 +0100 | 
|---|---|---|
| committer | Pablo Neira Ayuso <[email protected]> | 2019-01-18 02:29:42 +0100 | 
| commit | b2e3d68d1251a051a620f9086e18f7ffa6833b5b (patch) | |
| tree | 760de639d95d4ecfe13a661b50598dcb670b7a23 /tools/perf/scripts/python/sched-migration.py | |
| parent | cf52572ebbd7189a1966c2b5fc34b97078cd1dce (diff) | |
netfilter: nft_compat: destroy function must not have side effects
The nft_compat destroy function deletes the nft_xt object from a list.
This isn't allowed anymore. Destroy functions are called asynchronously,
i.e. next batch can find the object that has a pending ->destroy()
invocation:
cpu0                       cpu1
 worker
   ->destroy               for_each_entry()
	                     if (x == ...
			        return x->ops;
     list_del(x)
     kfree_rcu(x)
                           expr->ops->... // ops was free'd
To resolve this, the list_del needs to occur before the transaction
mutex gets released.  nf_tables has a 'deactivate' hook for this
purpose, so use that to unlink the object from the list.
Fixes: 0935d5588400 ("netfilter: nf_tables: asynchronous release")
Reported-by: Taehee Yoo <[email protected]>
Signed-off-by: Florian Westphal <[email protected]>
Signed-off-by: Pablo Neira Ayuso <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/sched-migration.py')
0 files changed, 0 insertions, 0 deletions