Go to file
Sabrina Dubroca b441cf3f8c xfrm: delete x->tunnel as we delete x
The ipcomp fallback tunnels currently get deleted (from the various
lists and hashtables) as the last user state that needed that fallback
is destroyed (not deleted). If a reference to that user state still
exists, the fallback state will remain on the hashtables/lists,
triggering the WARN in xfrm_state_fini. Because of those remaining
references, the fix in commit f75a2804da ("xfrm: destroy xfrm_state
synchronously on net exit path") is not complete.

We recently fixed one such situation in TCP due to defered freeing of
skbs (commit 9b6412e697 ("tcp: drop secpath at the same time as we
currently drop dst")). This can also happen due to IP reassembly: skbs
with a secpath remain on the reassembly queue until netns
destruction. If we can't guarantee that the queues are flushed by the
time xfrm_state_fini runs, there may still be references to a (user)
xfrm_state, preventing the timely deletion of the corresponding
fallback state.

Instead of chasing each instance of skbs holding a secpath one by one,
this patch fixes the issue directly within xfrm, by deleting the
fallback state as soon as the last user state depending on it has been
deleted. Destruction will still happen when the final reference is
dropped.

A separate lockdep class for the fallback state is required since
we're going to lock x->tunnel while x is locked.

Fixes: 9d4139c769 ("netns xfrm: per-netns xfrm_state_all list")
Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
2025-07-08 13:28:27 +02:00
Documentation bpf-next-6.16 2025-05-28 15:52:42 -07:00
LICENSES
arch bpf-next-6.16 2025-05-28 15:52:42 -07:00
block cgroup: Changes for v6.16 2025-05-27 20:59:53 -07:00
certs
crypto Networking changes for 6.16. 2025-05-28 15:24:36 -07:00
drivers net: airoha: Fix smac_id configuration in bridge mode 2025-06-03 12:55:29 +02:00
fs Networking changes for 6.16. 2025-05-28 15:24:36 -07:00
include xfrm: delete x->tunnel as we delete x 2025-07-08 13:28:27 +02:00
init hardening updates for v6.16-rc1 2025-05-28 07:47:10 -07:00
io_uring Networking changes for 6.16. 2025-05-28 15:24:36 -07:00
ipc
kernel bpf-next-6.16 2025-05-28 15:52:42 -07:00
lib Networking changes for 6.16. 2025-05-28 15:24:36 -07:00
mm Networking changes for 6.16. 2025-05-28 15:24:36 -07:00
net xfrm: delete x->tunnel as we delete x 2025-07-08 13:28:27 +02:00
rust Networking changes for 6.16. 2025-05-28 15:24:36 -07:00
samples Networking changes for 6.16. 2025-05-28 15:24:36 -07:00
scripts bpf-next-6.16 2025-05-28 15:52:42 -07:00
security Networking changes for 6.16. 2025-05-28 15:24:36 -07:00
sound sound updates for 6.16-rc1 2025-05-27 15:05:18 -07:00
tools selftests: net: build net/lib dependency in all target 2025-06-03 12:21:04 +02:00
usr
virt
.clang-format
.clippy.toml
.cocciconfig
.editorconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap NFSD 6.16 Release Notes 2025-05-28 12:21:12 -07:00
.pylintrc
.rustfmt.toml
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS Networking changes for 6.16. 2025-05-28 15:24:36 -07:00
Makefile A moderately busy cycle for documentation this time around: 2025-05-27 11:22:19 -07:00
README

README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the reStructuredText markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.