]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: nf_tables: do not hold reference on netdevice from preparation phase
authorPablo Neira Ayuso <pablo@netfilter.org>
Tue, 20 Mar 2018 16:00:19 +0000 (17:00 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Thu, 22 Mar 2018 12:17:52 +0000 (13:17 +0100)
commitf4f9120f5639c5e41e9166502da1279e9560b6d6
tree74c7035de716e4fdfdf3e9ec44341726713dbeb0
parent1bbe656caaa15136e35f858cb5b494294824744c
netfilter: nf_tables: do not hold reference on netdevice from preparation phase

The netfilter netdevice event handler hold the nfnl_lock mutex, this
avoids races with a device going away while such device is being
attached to hooks from the netlink control plane. Therefore, either
control plane bails out with ENOENT or netdevice event path waits until
the hook that is attached to net_device is registered.

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