]> 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)
commitca09846daf2e5a0d3506f506ccda9020fd4de731
tree74c7035de716e4fdfdf3e9ec44341726713dbeb0
parent017d125b350c4108e03f90cd345d2b9a81df9a07
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