summaryrefslogtreecommitdiff
path: root/include/uapi/linux
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2024-11-04 10:41:19 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-12-05 14:01:53 +0100
commit47b2ea9940bf51083ad3ab4f65b8f8f6425be8a9 (patch)
treeb3c5108f142949898c2c40454551552956d25d60 /include/uapi/linux
parentf9028bc35cca1a6cd14e7681675786643d39c600 (diff)
downloadlinux-47b2ea9940bf51083ad3ab4f65b8f8f6425be8a9.tar.gz
linux-47b2ea9940bf51083ad3ab4f65b8f8f6425be8a9.tar.bz2
linux-47b2ea9940bf51083ad3ab4f65b8f8f6425be8a9.zip
netfilter: nf_tables: must hold rcu read lock while iterating object type list
[ Upstream commit cddc04275f95ca3b18da5c0fb111705ac173af89 ] Update of stateful object triggers: WARNING: suspicious RCU usage net/netfilter/nf_tables_api.c:7759 RCU-list traversed in non-reader section!! other info that might help us debug this: rcu_scheduler_active = 2, debug_locks = 1 1 lock held by nft/3060: #0: ffff88810f0578c8 (&nft_net->commit_mutex){+.+.}-{4:4}, [..] ... but this list is not protected by the transaction mutex but the nfnl nftables subsystem mutex. Switch to nft_obj_type_get which will acquire rcu read lock, bump refcount, and returns the result. v3: Dan Carpenter points out nft_obj_type_get returns error pointer, not NULL, on error. Fixes: dad3bdeef45f ("netfilter: nf_tables: fix memory leak during stateful obj update"). Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include/uapi/linux')
0 files changed, 0 insertions, 0 deletions