netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH ipsec 0/2] ipsec: fix splat due to ipcomp fallback tunnel
@ 2025-07-04 14:54 Sabrina Dubroca
  2025-07-04 14:54 ` [PATCH ipsec 1/2] xfrm: delete x->tunnel as we delete x Sabrina Dubroca
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Sabrina Dubroca @ 2025-07-04 14:54 UTC (permalink / raw)
  To: netdev
  Cc: Steffen Klassert, Herbert Xu, Alexey Dobriyan, Cong Wang,
	Sabrina Dubroca

IPcomp tunnel states have an associated fallback tunnel, a keep a
reference on the corresponding xfrm_state, to allow deleting that
extra state when it's not needed anymore. These states cause issues
during netns deletion.

Commit f75a2804da39 ("xfrm: destroy xfrm_state synchronously on net
exit path") tried to address these problems but doesn't fully solve
them, and slowed down netns deletion by adding one synchronize_rcu per
deleted state.

The first patch solves the problem by moving the fallback state
deletion earlier (when we delete the user state, rather than at
destruction), then we can revert the previous fix.

Sabrina Dubroca (2):
  xfrm: delete x->tunnel as we delete x
  Revert "xfrm: destroy xfrm_state synchronously on net exit path"

 include/net/xfrm.h      | 13 +++----------
 net/ipv4/ipcomp.c       |  2 ++
 net/ipv6/ipcomp6.c      |  2 ++
 net/ipv6/xfrm6_tunnel.c |  2 +-
 net/key/af_key.c        |  2 +-
 net/xfrm/xfrm_ipcomp.c  |  1 -
 net/xfrm/xfrm_state.c   | 40 ++++++++++++++++------------------------
 net/xfrm/xfrm_user.c    |  2 +-
 8 files changed, 26 insertions(+), 38 deletions(-)

-- 
2.50.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-07-14  7:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-04 14:54 [PATCH ipsec 0/2] ipsec: fix splat due to ipcomp fallback tunnel Sabrina Dubroca
2025-07-04 14:54 ` [PATCH ipsec 1/2] xfrm: delete x->tunnel as we delete x Sabrina Dubroca
2025-07-04 14:54 ` [PATCH ipsec 2/2] Revert "xfrm: destroy xfrm_state synchronously on net exit path" Sabrina Dubroca
2025-07-14  7:02 ` [PATCH ipsec 0/2] ipsec: fix splat due to ipcomp fallback tunnel Steffen Klassert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).