]> git.ipfire.org Git - thirdparty/linux.git/commit
xfrm: check all hash buckets for leftover states during netns deletion
authorSabrina Dubroca <sd@queasysnail.net>
Thu, 16 Oct 2025 10:39:17 +0000 (12:39 +0200)
committerSteffen Klassert <steffen.klassert@secunet.com>
Tue, 21 Oct 2025 08:42:45 +0000 (10:42 +0200)
commitf2bc8231fd43a02f9d97252b3435869727054d60
tree0cf19c930929f967791a665f77dbc97446489588
parent1dcf617bec5cb85f68ca19969e7537ef6f6931d3
xfrm: check all hash buckets for leftover states during netns deletion

The current hlist_empty checks only test the first bucket of each
hashtable, ignoring any other bucket. They should be caught by the
WARN_ON for state_all, but better to make all the checks accurate.

Fixes: 73d189dce486 ("netns xfrm: per-netns xfrm_state_bydst hash")
Fixes: d320bbb306f2 ("netns xfrm: per-netns xfrm_state_bysrc hash")
Fixes: b754a4fd8f58 ("netns xfrm: per-netns xfrm_state_byspi hash")
Fixes: fe9f1d8779cb ("xfrm: add state hashtable keyed by seq")
Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
net/xfrm/xfrm_state.c