]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
netfilter: egress: silence egress hook lockdep splats
authorFlorian Westphal <fw@strlen.de>
Mon, 28 Feb 2022 03:18:05 +0000 (04:18 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 28 Feb 2022 21:34:04 +0000 (22:34 +0100)
commit17a8f31bba7bac8cce4bd12bab50697da96e7710
tree0f4827fd50e30d1a2b296ff0a7b9a024843a2b31
parent56763f12b0f02706576a088e85ef856deacc98a0
netfilter: egress: silence egress hook lockdep splats

Netfilter assumes its called with rcu_read_lock held, but in egress
hook case it may be called with BH readlock.

This triggers lockdep splat.

In order to avoid to change all rcu_dereference() to
rcu_dereference_check(..., rcu_read_lock_bh_held()), wrap nf_hook_slow
with read lock/unlock pair.

Reported-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
include/linux/netfilter_netdev.h