]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: nft_flow_offload: wait for garbage collector to run after cleanup
authorPablo Neira Ayuso <pablo@netfilter.org>
Thu, 1 Feb 2018 17:49:00 +0000 (18:49 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Fri, 2 Feb 2018 17:26:42 +0000 (18:26 +0100)
commit756759b232adeb1d945e43818907a9f2127248a7
tree88aa5bcfc07581b764d8db201d356a541c92ead3
parentfaf310a7dd0a23e714b7cd1796a66ae0457bb2f6
netfilter: nft_flow_offload: wait for garbage collector to run after cleanup

If netdevice goes down, then flowtable entries are scheduled to be
removed. Wait for garbage collector to have a chance to run so it can
delete them from the hashtable.

The flush call might sleep, so hold the nfnl mutex from
nft_flow_table_iterate() instead of rcu read side lock. The use of the
nfnl mutex is also implicitly fixing races between updates via nfnetlink
and netdevice event.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nf_tables_api.c
net/netfilter/nft_flow_offload.c