Commit 502916a4 authored by Felix Fietkau's avatar Felix Fietkau Committed by sanglipeng
Browse files

netfilter: flowtable_offload: add missing locking

stable inclusion
from stable-v5.10.157
commit b8e494240e69f91517256adcd6fda62d0671772d
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I7MU59

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=b8e494240e69f91517256adcd6fda62d0671772d



--------------------------------

[ Upstream commit bcd9e3c1 ]

nf_flow_table_block_setup and the driver TC_SETUP_FT call can modify the flow
block cb list while they are being traversed elsewhere, causing a crash.
Add a write lock around the calls to protect readers

Fixes: c29f74e0 ("netfilter: nf_flow_table: hardware offload support")
Reported-by: default avatarChad Monroe <chad.monroe@smartrg.com>
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent 157a92e7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment