mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-04 18:19:28 +09:00
netfilter: ipset: Fix rename concurrency with listing
[ Upstream commit 6c1f7e2c1b ]
Shijie Luo reported that when stress-testing ipset with multiple concurrent
create, rename, flush, list, destroy commands, it can result
ipset <version>: Broken LIST kernel message: missing DATA part!
error messages and broken list results. The problem was the rename operation
was not properly handled with respect of listing. The patch fixes the issue.
Reported-by: Shijie Luo <luoshijie1@huawei.com>
Signed-off-by: Jozsef Kadlecsik <kadlec@netfilter.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
80688abcb9
commit
aa79a247cb
@@ -1128,7 +1128,7 @@ static int ip_set_rename(struct net *net, struct sock *ctnl,
|
||||
return -ENOENT;
|
||||
|
||||
write_lock_bh(&ip_set_ref_lock);
|
||||
if (set->ref != 0) {
|
||||
if (set->ref != 0 || set->ref_netlink != 0) {
|
||||
ret = -IPSET_ERR_REFERENCED;
|
||||
goto out;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user