mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-28 09:31:14 +00:00
netfilter: nfnetlink: fix potential dead lock in nfnetlink_rcv_msg()
[ Upstream commit03832a32bf
] When type is NFNL_CB_MUTEX and -EAGAIN error occur in nfnetlink_rcv_msg(), it does not execute nfnl_unlock(). That would trigger potential dead lock. Fixes:50f2db9e36
("netfilter: nfnetlink: consolidate callback types") Signed-off-by: Ziyang Xuan <william.xuanziyang@huawei.com> Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
a604c3b91c
commit
a575908cb3
1 changed files with 1 additions and 0 deletions
|
@ -290,6 +290,7 @@ replay:
|
|||
nfnl_lock(subsys_id);
|
||||
if (nfnl_dereference_protected(subsys_id) != ss ||
|
||||
nfnetlink_find_client(type, ss) != nc) {
|
||||
nfnl_unlock(subsys_id);
|
||||
err = -EAGAIN;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue