c2dc077d8f
commit 97f7cf1cd80eeed3b7c808b7c12463295c751001 upstream. 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/C0829B10-EAA6-4809-874E-E1E9C05A8D84@automattic.com/ Fixes: 28628fa952fe ("netfilter: ipset: fix race condition between swap/destroy and kernel side add/del/test") Reported-by: Ale Crismani <ale.crismani@automattic.com> Reported-by: David Wang <00107082@163.com> Tested-by: David Wang <00107082@163.com> Signed-off-by: Jozsef Kadlecsik <kadlec@netfilter.org> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
||
---|---|---|
.. | ||
ipset | ||
nf_conntrack_amanda.h | ||
nf_conntrack_common.h | ||
nf_conntrack_dccp.h | ||
nf_conntrack_ftp.h | ||
nf_conntrack_h323.h | ||
nf_conntrack_h323_asn1.h | ||
nf_conntrack_h323_types.h | ||
nf_conntrack_irc.h | ||
nf_conntrack_pptp.h | ||
nf_conntrack_proto_gre.h | ||
nf_conntrack_sane.h | ||
nf_conntrack_sctp.h | ||
nf_conntrack_sip.h | ||
nf_conntrack_snmp.h | ||
nf_conntrack_tcp.h | ||
nf_conntrack_tftp.h | ||
nf_conntrack_zones_common.h | ||
nfnetlink.h | ||
nfnetlink_acct.h | ||
nfnetlink_osf.h | ||
x_tables.h |