diff options
| author | Florian Westphal <[email protected]> | 2023-03-03 09:58:56 +0000 |
|---|---|---|
| committer | Pablo Neira Ayuso <[email protected]> | 2023-03-06 11:09:48 +0000 |
| commit | 4a02426787bf024dafdb79b362285ee325de3f5e (patch) | |
| tree | 88f0905ed0e7028251bdbda88b015e84d1b46ed6 /net/unix/af_unix.c | |
| parent | netfilter: ctnetlink: revert to dumping mark regardless of event type (diff) | |
| download | kernel-4a02426787bf024dafdb79b362285ee325de3f5e.tar.gz kernel-4a02426787bf024dafdb79b362285ee325de3f5e.zip | |
netfilter: tproxy: fix deadlock due to missing BH disable
The xtables packet traverser performs an unconditional local_bh_disable(),
but the nf_tables evaluation loop does not.
Functions that are called from either xtables or nftables must assume
that they can be called in process context.
inet_twsk_deschedule_put() assumes that no softirq interrupt can occur.
If tproxy is used from nf_tables its possible that we'll deadlock
trying to aquire a lock already held in process context.
Add a small helper that takes care of this and use it.
Link: https://lore.kernel.org/netfilter-devel/[email protected]/
Fixes: 4ed8eb6570a4 ("netfilter: nf_tables: Add native tproxy support")
Reported-and-tested-by: Major Dávid <[email protected]>
Signed-off-by: Florian Westphal <[email protected]>
Signed-off-by: Pablo Neira Ayuso <[email protected]>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions
