aboutsummaryrefslogtreecommitdiffstats
path: root/net/unix/af_unix.c
diff options
context:
space:
mode:
authorJozsef Kadlecsik <[email protected]>2024-01-29 09:57:01 +0000
committerPablo Neira Ayuso <[email protected]>2024-01-31 22:13:57 +0000
commit97f7cf1cd80eeed3b7c808b7c12463295c751001 (patch)
treea6f9d04750a5f18e1c1cd9aa0b384a47d1042864 /net/unix/af_unix.c
parentnetfilter: conntrack: check SCTP_CID_SHUTDOWN_ACK for vtag setting in sctp_new (diff)
downloadkernel-97f7cf1cd80eeed3b7c808b7c12463295c751001.tar.gz
kernel-97f7cf1cd80eeed3b7c808b7c12463295c751001.zip
netfilter: ipset: fix performance regression in swap operation
The patch "netfilter: ipset: fix race condition between swap/destroy and kernel side add/del/test", commit 28628fa9 fixes a race condition. But the synchronize_rcu() added to the swap function unnecessarily slows it down: it can safely be moved to destroy and use call_rcu() instead. Eric Dumazet pointed out that simply calling the destroy functions as rcu callback does not work: sets with timeout use garbage collectors which need cancelling at destroy which can wait. Therefore the destroy functions are split into two: cancelling garbage collectors safely at executing the command received by netlink and moving the remaining part only into the rcu callback. Link: https://lore.kernel.org/lkml/[email protected]/ Fixes: 28628fa952fe ("netfilter: ipset: fix race condition between swap/destroy and kernel side add/del/test") Reported-by: Ale Crismani <[email protected]> Reported-by: David Wang <[email protected]> Tested-by: David Wang <[email protected]> Signed-off-by: Jozsef Kadlecsik <[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