summaryrefslogtreecommitdiff
path: root/net/key
diff options
context:
space:
mode:
authorSabrina Dubroca <sd@queasysnail.net>2025-07-04 16:54:34 +0200
committerSteffen Klassert <steffen.klassert@secunet.com>2025-07-08 13:28:29 +0200
commit2a198bbec6913ae1c90ec963750003c6213668c7 (patch)
tree840afec7451b11d9d799e83f4992943f4fac2a8d /net/key
parentb441cf3f8c4b8576639d20c8eb4aa32917602ecd (diff)
downloadlinux-2a198bbec6913ae1c90ec963750003c6213668c7.tar.gz
linux-2a198bbec6913ae1c90ec963750003c6213668c7.tar.bz2
linux-2a198bbec6913ae1c90ec963750003c6213668c7.zip
Revert "xfrm: destroy xfrm_state synchronously on net exit path"
This reverts commit f75a2804da391571563c4b6b29e7797787332673. With all states (whether user or kern) removed from the hashtables during deletion, there's no need for synchronous destruction of states. xfrm6_tunnel states still need to have been destroyed (which will be the case when its last user is deleted (not destroyed)) so that xfrm6_tunnel_free_spi removes it from the per-netns hashtable before the netns is destroyed. This has the benefit of skipping one synchronize_rcu per state (in __xfrm_state_destroy(sync=true)) when we exit a netns. Signed-off-by: Sabrina Dubroca <sd@queasysnail.net> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Diffstat (limited to 'net/key')
-rw-r--r--net/key/af_key.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/key/af_key.c b/net/key/af_key.c
index efc2a91f4c48..b5d761700776 100644
--- a/net/key/af_key.c
+++ b/net/key/af_key.c
@@ -1766,7 +1766,7 @@ static int pfkey_flush(struct sock *sk, struct sk_buff *skb, const struct sadb_m
if (proto == 0)
return -EINVAL;
- err = xfrm_state_flush(net, proto, true, false);
+ err = xfrm_state_flush(net, proto, true);
err2 = unicast_flush_resp(sk, hdr);
if (err || err2) {
if (err == -ESRCH) /* empty table - go quietly */