]> git.ipfire.org Git - thirdparty/linux.git/commit
Revert "xfrm: destroy xfrm_state synchronously on net exit path"
authorSabrina Dubroca <sd@queasysnail.net>
Fri, 4 Jul 2025 14:54:34 +0000 (16:54 +0200)
committerSteffen Klassert <steffen.klassert@secunet.com>
Tue, 8 Jul 2025 11:28:29 +0000 (13:28 +0200)
commit2a198bbec6913ae1c90ec963750003c6213668c7
tree840afec7451b11d9d799e83f4992943f4fac2a8d
parentb441cf3f8c4b8576639d20c8eb4aa32917602ecd
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>
include/net/xfrm.h
net/ipv6/xfrm6_tunnel.c
net/key/af_key.c
net/xfrm/xfrm_state.c
net/xfrm/xfrm_user.c