* [PATCH ipsec 1/6] xfrm: drop SA reference in xfrm_state_update if dir doesn't match
2025-10-16 10:39 [PATCH ipsec 0/6] xfrm: misc fixes Sabrina Dubroca
@ 2025-10-16 10:39 ` Sabrina Dubroca
2025-10-16 10:39 ` [PATCH ipsec 2/6] xfrm: also call xfrm_state_delete_tunnel at destroy time for states that were never added Sabrina Dubroca
` (5 subsequent siblings)
6 siblings, 0 replies; 12+ messages in thread
From: Sabrina Dubroca @ 2025-10-16 10:39 UTC (permalink / raw)
To: netdev; +Cc: steffen.klassert, Sabrina Dubroca, Antony Antony
We're not updating x1, but we still need to put() it.
Fixes: a4a87fa4e96c ("xfrm: Add Direction to the SA in or out")
Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
---
net/xfrm/xfrm_state.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c
index d213ca3653a8..e4736d1ebb44 100644
--- a/net/xfrm/xfrm_state.c
+++ b/net/xfrm/xfrm_state.c
@@ -2191,14 +2191,18 @@ int xfrm_state_update(struct xfrm_state *x)
}
if (x1->km.state == XFRM_STATE_ACQ) {
- if (x->dir && x1->dir != x->dir)
+ if (x->dir && x1->dir != x->dir) {
+ to_put = x1;
goto out;
+ }
__xfrm_state_insert(x);
x = NULL;
} else {
- if (x1->dir != x->dir)
+ if (x1->dir != x->dir) {
+ to_put = x1;
goto out;
+ }
}
err = 0;
--
2.51.0
^ permalink raw reply related [flat|nested] 12+ messages in thread* [PATCH ipsec 2/6] xfrm: also call xfrm_state_delete_tunnel at destroy time for states that were never added
2025-10-16 10:39 [PATCH ipsec 0/6] xfrm: misc fixes Sabrina Dubroca
2025-10-16 10:39 ` [PATCH ipsec 1/6] xfrm: drop SA reference in xfrm_state_update if dir doesn't match Sabrina Dubroca
@ 2025-10-16 10:39 ` Sabrina Dubroca
2025-10-16 10:39 ` [PATCH ipsec 3/6] xfrm: make state as DEAD before final put when migrate fails Sabrina Dubroca
` (4 subsequent siblings)
6 siblings, 0 replies; 12+ messages in thread
From: Sabrina Dubroca @ 2025-10-16 10:39 UTC (permalink / raw)
To: netdev; +Cc: steffen.klassert, Sabrina Dubroca, syzbot+999eb23467f83f9bf9bf
In commit b441cf3f8c4b ("xfrm: delete x->tunnel as we delete x"), I
missed the case where state creation fails between full
initialization (->init_state has been called) and being inserted on
the lists.
In this situation, ->init_state has been called, so for IPcomp
tunnels, the fallback tunnel has been created and added onto the
lists, but the user state never gets added, because we fail before
that. The user state doesn't go through __xfrm_state_delete, so we
don't call xfrm_state_delete_tunnel for those states, and we end up
leaking the FB tunnel.
There are several codepaths affected by this: the add/update paths, in
both net/key and xfrm, and the migrate code (xfrm_migrate,
xfrm_state_migrate). A "proper" rollback of the init_state work would
probably be doable in the add/update code, but for migrate it gets
more complicated as multiple states may be involved.
At some point, the new (not-inserted) state will be destroyed, so call
xfrm_state_delete_tunnel during xfrm_state_gc_destroy. Most states
will have their fallback tunnel cleaned up during __xfrm_state_delete,
which solves the issue that b441cf3f8c4b (and other patches before it)
aimed at. All states (including FB tunnels) will be removed from the
lists once xfrm_state_fini has called flush_work(&xfrm_state_gc_work).
Reported-by: syzbot+999eb23467f83f9bf9bf@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=999eb23467f83f9bf9bf
Fixes: b441cf3f8c4b ("xfrm: delete x->tunnel as we delete x")
Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
---
net/xfrm/xfrm_state.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c
index e4736d1ebb44..721ef0f409b5 100644
--- a/net/xfrm/xfrm_state.c
+++ b/net/xfrm/xfrm_state.c
@@ -592,6 +592,7 @@ void xfrm_state_free(struct xfrm_state *x)
}
EXPORT_SYMBOL(xfrm_state_free);
+static void xfrm_state_delete_tunnel(struct xfrm_state *x);
static void xfrm_state_gc_destroy(struct xfrm_state *x)
{
if (x->mode_cbs && x->mode_cbs->destroy_state)
@@ -607,6 +608,7 @@ static void xfrm_state_gc_destroy(struct xfrm_state *x)
kfree(x->replay_esn);
kfree(x->preplay_esn);
xfrm_unset_type_offload(x);
+ xfrm_state_delete_tunnel(x);
if (x->type) {
x->type->destructor(x);
xfrm_put_type(x->type);
@@ -806,7 +808,6 @@ void __xfrm_state_destroy(struct xfrm_state *x)
}
EXPORT_SYMBOL(__xfrm_state_destroy);
-static void xfrm_state_delete_tunnel(struct xfrm_state *x);
int __xfrm_state_delete(struct xfrm_state *x)
{
struct net *net = xs_net(x);
--
2.51.0
^ permalink raw reply related [flat|nested] 12+ messages in thread* [PATCH ipsec 3/6] xfrm: make state as DEAD before final put when migrate fails
2025-10-16 10:39 [PATCH ipsec 0/6] xfrm: misc fixes Sabrina Dubroca
2025-10-16 10:39 ` [PATCH ipsec 1/6] xfrm: drop SA reference in xfrm_state_update if dir doesn't match Sabrina Dubroca
2025-10-16 10:39 ` [PATCH ipsec 2/6] xfrm: also call xfrm_state_delete_tunnel at destroy time for states that were never added Sabrina Dubroca
@ 2025-10-16 10:39 ` Sabrina Dubroca
2025-10-16 10:39 ` [PATCH ipsec 4/6] xfrm: call xfrm_dev_state_delete when xfrm_state_migrate fails to add the state Sabrina Dubroca
` (3 subsequent siblings)
6 siblings, 0 replies; 12+ messages in thread
From: Sabrina Dubroca @ 2025-10-16 10:39 UTC (permalink / raw)
To: netdev; +Cc: steffen.klassert, Sabrina Dubroca, syzbot+5cd6299ede4d4f70987b
xfrm_state_migrate/xfrm_state_clone_and_setup create a new state, and
call xfrm_state_put to destroy it in case of
failure. __xfrm_state_destroy expects the state to be in
XFRM_STATE_DEAD, but we currently don't do that.
Reported-by: syzbot+5cd6299ede4d4f70987b@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=5cd6299ede4d4f70987b
Fixes: 78347c8c6b2d ("xfrm: Fix xfrm_state_migrate leak")
Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
---
net/xfrm/xfrm_state.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c
index 721ef0f409b5..1ab19ca007de 100644
--- a/net/xfrm/xfrm_state.c
+++ b/net/xfrm/xfrm_state.c
@@ -2074,6 +2074,7 @@ static struct xfrm_state *xfrm_state_clone_and_setup(struct xfrm_state *orig,
return x;
error:
+ x->km.state = XFRM_STATE_DEAD;
xfrm_state_put(x);
out:
return NULL;
@@ -2163,6 +2164,7 @@ struct xfrm_state *xfrm_state_migrate(struct xfrm_state *x,
return xc;
error:
+ xc->km.state = XFRM_STATE_DEAD;
xfrm_state_put(xc);
return NULL;
}
--
2.51.0
^ permalink raw reply related [flat|nested] 12+ messages in thread* [PATCH ipsec 4/6] xfrm: call xfrm_dev_state_delete when xfrm_state_migrate fails to add the state
2025-10-16 10:39 [PATCH ipsec 0/6] xfrm: misc fixes Sabrina Dubroca
` (2 preceding siblings ...)
2025-10-16 10:39 ` [PATCH ipsec 3/6] xfrm: make state as DEAD before final put when migrate fails Sabrina Dubroca
@ 2025-10-16 10:39 ` Sabrina Dubroca
2025-10-19 13:46 ` Leon Romanovsky
2025-10-16 10:39 ` [PATCH ipsec 5/6] xfrm: set err and extack on failure to create pcpu SA Sabrina Dubroca
` (2 subsequent siblings)
6 siblings, 1 reply; 12+ messages in thread
From: Sabrina Dubroca @ 2025-10-16 10:39 UTC (permalink / raw)
To: netdev; +Cc: steffen.klassert, Sabrina Dubroca, Chiachang Wang,
Leon Romanovsky
In case xfrm_state_migrate fails after calling xfrm_dev_state_add, we
directly release the last reference and destroy the new state, without
calling xfrm_dev_state_delete (this only happens in
__xfrm_state_delete, which we're not calling on this path, since the
state was never added).
Call xfrm_dev_state_delete on error when an offload configuration was
provided.
Fixes: ab244a394c7f ("xfrm: Migrate offload configuration")
Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
---
net/xfrm/xfrm_state.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c
index 1ab19ca007de..c3518d1498cd 100644
--- a/net/xfrm/xfrm_state.c
+++ b/net/xfrm/xfrm_state.c
@@ -2159,10 +2159,13 @@ struct xfrm_state *xfrm_state_migrate(struct xfrm_state *x,
xfrm_state_insert(xc);
} else {
if (xfrm_state_add(xc) < 0)
- goto error;
+ goto error_add;
}
return xc;
+error_add:
+ if (xuo)
+ xfrm_dev_state_delete(xc);
error:
xc->km.state = XFRM_STATE_DEAD;
xfrm_state_put(xc);
--
2.51.0
^ permalink raw reply related [flat|nested] 12+ messages in thread* Re: [PATCH ipsec 4/6] xfrm: call xfrm_dev_state_delete when xfrm_state_migrate fails to add the state
2025-10-16 10:39 ` [PATCH ipsec 4/6] xfrm: call xfrm_dev_state_delete when xfrm_state_migrate fails to add the state Sabrina Dubroca
@ 2025-10-19 13:46 ` Leon Romanovsky
0 siblings, 0 replies; 12+ messages in thread
From: Leon Romanovsky @ 2025-10-19 13:46 UTC (permalink / raw)
To: Sabrina Dubroca; +Cc: netdev, steffen.klassert, Chiachang Wang
On Thu, Oct 16, 2025 at 12:39:15PM +0200, Sabrina Dubroca wrote:
> In case xfrm_state_migrate fails after calling xfrm_dev_state_add, we
> directly release the last reference and destroy the new state, without
> calling xfrm_dev_state_delete (this only happens in
> __xfrm_state_delete, which we're not calling on this path, since the
> state was never added).
>
> Call xfrm_dev_state_delete on error when an offload configuration was
> provided.
>
> Fixes: ab244a394c7f ("xfrm: Migrate offload configuration")
> Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
> ---
> net/xfrm/xfrm_state.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
Thanks,
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH ipsec 5/6] xfrm: set err and extack on failure to create pcpu SA
2025-10-16 10:39 [PATCH ipsec 0/6] xfrm: misc fixes Sabrina Dubroca
` (3 preceding siblings ...)
2025-10-16 10:39 ` [PATCH ipsec 4/6] xfrm: call xfrm_dev_state_delete when xfrm_state_migrate fails to add the state Sabrina Dubroca
@ 2025-10-16 10:39 ` Sabrina Dubroca
2025-10-16 10:39 ` [PATCH ipsec 6/6] xfrm: check all hash buckets for leftover states during netns deletion Sabrina Dubroca
2025-10-22 5:42 ` [PATCH ipsec 0/6] xfrm: misc fixes Steffen Klassert
6 siblings, 0 replies; 12+ messages in thread
From: Sabrina Dubroca @ 2025-10-16 10:39 UTC (permalink / raw)
To: netdev; +Cc: steffen.klassert, Sabrina Dubroca, Antony Antony, Tobias Brunner
xfrm_state_construct can fail without setting an error if the
requested pcpu_num value is too big. Set err and add an extack message
to avoid confusing userspace.
Fixes: 1ddf9916ac09 ("xfrm: Add support for per cpu xfrm state handling.")
Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
---
net/xfrm/xfrm_user.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c
index 010c9e6638c0..9d98cc9daa37 100644
--- a/net/xfrm/xfrm_user.c
+++ b/net/xfrm/xfrm_user.c
@@ -947,8 +947,11 @@ static struct xfrm_state *xfrm_state_construct(struct net *net,
if (attrs[XFRMA_SA_PCPU]) {
x->pcpu_num = nla_get_u32(attrs[XFRMA_SA_PCPU]);
- if (x->pcpu_num >= num_possible_cpus())
+ if (x->pcpu_num >= num_possible_cpus()) {
+ err = -ERANGE;
+ NL_SET_ERR_MSG(extack, "pCPU number too big");
goto error;
+ }
}
err = __xfrm_init_state(x, extack);
--
2.51.0
^ permalink raw reply related [flat|nested] 12+ messages in thread* [PATCH ipsec 6/6] xfrm: check all hash buckets for leftover states during netns deletion
2025-10-16 10:39 [PATCH ipsec 0/6] xfrm: misc fixes Sabrina Dubroca
` (4 preceding siblings ...)
2025-10-16 10:39 ` [PATCH ipsec 5/6] xfrm: set err and extack on failure to create pcpu SA Sabrina Dubroca
@ 2025-10-16 10:39 ` Sabrina Dubroca
2025-10-17 15:10 ` kernel test robot
2025-10-22 5:42 ` [PATCH ipsec 0/6] xfrm: misc fixes Steffen Klassert
6 siblings, 1 reply; 12+ messages in thread
From: Sabrina Dubroca @ 2025-10-16 10:39 UTC (permalink / raw)
To: netdev; +Cc: steffen.klassert, Sabrina Dubroca, Alexey Dobriyan
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>
---
net/xfrm/xfrm_state.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c
index c3518d1498cd..9e14e453b55c 100644
--- a/net/xfrm/xfrm_state.c
+++ b/net/xfrm/xfrm_state.c
@@ -3308,6 +3308,7 @@ int __net_init xfrm_state_init(struct net *net)
void xfrm_state_fini(struct net *net)
{
unsigned int sz;
+ int i;
flush_work(&net->xfrm.state_hash_work);
xfrm_state_flush(net, 0, false);
@@ -3315,14 +3316,17 @@ void xfrm_state_fini(struct net *net)
WARN_ON(!list_empty(&net->xfrm.state_all));
+ for (i = 0; i <= net->xfrm.state_hmask; i++) {
+ WARN_ON(!hlist_empty(net->xfrm.state_byseq + i));
+ WARN_ON(!hlist_empty(net->xfrm.state_byspi + i));
+ WARN_ON(!hlist_empty(net->xfrm.state_bysrc + i));
+ WARN_ON(!hlist_empty(net->xfrm.state_bydst + i));
+ }
+
sz = (net->xfrm.state_hmask + 1) * sizeof(struct hlist_head);
- WARN_ON(!hlist_empty(net->xfrm.state_byseq));
xfrm_hash_free(net->xfrm.state_byseq, sz);
- WARN_ON(!hlist_empty(net->xfrm.state_byspi));
xfrm_hash_free(net->xfrm.state_byspi, sz);
- WARN_ON(!hlist_empty(net->xfrm.state_bysrc));
xfrm_hash_free(net->xfrm.state_bysrc, sz);
- WARN_ON(!hlist_empty(net->xfrm.state_bydst));
xfrm_hash_free(net->xfrm.state_bydst, sz);
free_percpu(net->xfrm.state_cache_input);
}
--
2.51.0
^ permalink raw reply related [flat|nested] 12+ messages in thread* Re: [PATCH ipsec 6/6] xfrm: check all hash buckets for leftover states during netns deletion
2025-10-16 10:39 ` [PATCH ipsec 6/6] xfrm: check all hash buckets for leftover states during netns deletion Sabrina Dubroca
@ 2025-10-17 15:10 ` kernel test robot
2025-10-19 23:00 ` Sabrina Dubroca
0 siblings, 1 reply; 12+ messages in thread
From: kernel test robot @ 2025-10-17 15:10 UTC (permalink / raw)
To: Sabrina Dubroca, netdev
Cc: oe-kbuild-all, steffen.klassert, Sabrina Dubroca, Alexey Dobriyan
Hi Sabrina,
kernel test robot noticed the following build warnings:
[auto build test WARNING on klassert-ipsec-next/master]
[also build test WARNING on klassert-ipsec/master net/main net-next/main linus/master v6.18-rc1 next-20251016]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Sabrina-Dubroca/xfrm-drop-SA-reference-in-xfrm_state_update-if-dir-doesn-t-match/20251016-184507
base: https://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec-next.git master
patch link: https://lore.kernel.org/r/2a743a05bbad7ebdc36c2c86a5fcbb9e99071c7b.1760610268.git.sd%40queasysnail.net
patch subject: [PATCH ipsec 6/6] xfrm: check all hash buckets for leftover states during netns deletion
config: x86_64-randconfig-r123-20251017 (https://download.01.org/0day-ci/archive/20251017/202510172159.iLR9bfcc-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251017/202510172159.iLR9bfcc-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202510172159.iLR9bfcc-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
net/xfrm/xfrm_state.c:1737:9: sparse: got struct hlist_head [noderef] __rcu *
net/xfrm/xfrm_state.c:1744:17: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:1744:17: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:1744:17: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:1744:17: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:1744:17: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:1744:17: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:1744:17: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:1744:17: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:1744:17: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:1744:17: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:1744:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected struct hlist_head *h @@ got struct hlist_head [noderef] __rcu * @@
net/xfrm/xfrm_state.c:1744:17: sparse: expected struct hlist_head *h
net/xfrm/xfrm_state.c:1744:17: sparse: got struct hlist_head [noderef] __rcu *
net/xfrm/xfrm_state.c:1751:17: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:1751:17: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:1751:17: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:1751:17: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:1751:17: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:1751:17: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:1751:17: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:1751:17: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:1751:17: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:1751:17: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:1751:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected struct hlist_head *h @@ got struct hlist_head [noderef] __rcu * @@
net/xfrm/xfrm_state.c:1751:17: sparse: expected struct hlist_head *h
net/xfrm/xfrm_state.c:1751:17: sparse: got struct hlist_head [noderef] __rcu *
net/xfrm/xfrm_state.c:1871:17: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:1871:17: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:1871:17: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:1871:17: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:1871:17: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:1871:17: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:1871:17: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:1871:17: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:1871:17: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:1871:17: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:1871:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected struct hlist_head *h @@ got struct hlist_head [noderef] __rcu * @@
net/xfrm/xfrm_state.c:1871:17: sparse: expected struct hlist_head *h
net/xfrm/xfrm_state.c:1871:17: sparse: got struct hlist_head [noderef] __rcu *
net/xfrm/xfrm_state.c:1874:17: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:1874:17: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:1874:17: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:1874:17: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:1874:17: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:1874:17: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:1874:17: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:1874:17: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:1874:17: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:1874:17: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:1874:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected struct hlist_head *h @@ got struct hlist_head [noderef] __rcu * @@
net/xfrm/xfrm_state.c:1874:17: sparse: expected struct hlist_head *h
net/xfrm/xfrm_state.c:1874:17: sparse: got struct hlist_head [noderef] __rcu *
net/xfrm/xfrm_state.c:2506:9: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:2506:9: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:2506:9: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:2506:9: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:2506:9: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:2506:9: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:2506:9: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:2506:9: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:2506:9: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:2506:9: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:2605:25: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:2605:25: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:2605:25: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:2605:25: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:2605:25: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:2605:25: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:2605:25: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:2605:25: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:2605:25: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:2605:25: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:2605:25: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected struct hlist_head *h @@ got struct hlist_head [noderef] __rcu * @@
net/xfrm/xfrm_state.c:2605:25: sparse: expected struct hlist_head *h
net/xfrm/xfrm_state.c:2605:25: sparse: got struct hlist_head [noderef] __rcu *
net/xfrm/xfrm_state.c:3270:31: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct hlist_head [noderef] __rcu *state_bydst @@ got struct hlist_head * @@
net/xfrm/xfrm_state.c:3270:31: sparse: expected struct hlist_head [noderef] __rcu *state_bydst
net/xfrm/xfrm_state.c:3270:31: sparse: got struct hlist_head *
net/xfrm/xfrm_state.c:3273:31: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct hlist_head [noderef] __rcu *state_bysrc @@ got struct hlist_head * @@
net/xfrm/xfrm_state.c:3273:31: sparse: expected struct hlist_head [noderef] __rcu *state_bysrc
net/xfrm/xfrm_state.c:3273:31: sparse: got struct hlist_head *
net/xfrm/xfrm_state.c:3276:31: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct hlist_head [noderef] __rcu *state_byspi @@ got struct hlist_head * @@
net/xfrm/xfrm_state.c:3276:31: sparse: expected struct hlist_head [noderef] __rcu *state_byspi
net/xfrm/xfrm_state.c:3276:31: sparse: got struct hlist_head *
net/xfrm/xfrm_state.c:3279:31: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct hlist_head [noderef] __rcu *state_byseq @@ got struct hlist_head * @@
net/xfrm/xfrm_state.c:3279:31: sparse: expected struct hlist_head [noderef] __rcu *state_byseq
net/xfrm/xfrm_state.c:3279:31: sparse: got struct hlist_head *
net/xfrm/xfrm_state.c:3297:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct hlist_head *n @@ got struct hlist_head [noderef] __rcu *state_byseq @@
net/xfrm/xfrm_state.c:3297:33: sparse: expected struct hlist_head *n
net/xfrm/xfrm_state.c:3297:33: sparse: got struct hlist_head [noderef] __rcu *state_byseq
net/xfrm/xfrm_state.c:3299:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct hlist_head *n @@ got struct hlist_head [noderef] __rcu *state_byspi @@
net/xfrm/xfrm_state.c:3299:33: sparse: expected struct hlist_head *n
net/xfrm/xfrm_state.c:3299:33: sparse: got struct hlist_head [noderef] __rcu *state_byspi
net/xfrm/xfrm_state.c:3301:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct hlist_head *n @@ got struct hlist_head [noderef] __rcu *state_bysrc @@
net/xfrm/xfrm_state.c:3301:33: sparse: expected struct hlist_head *n
net/xfrm/xfrm_state.c:3301:33: sparse: got struct hlist_head [noderef] __rcu *state_bysrc
net/xfrm/xfrm_state.c:3303:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct hlist_head *n @@ got struct hlist_head [noderef] __rcu *state_bydst @@
net/xfrm/xfrm_state.c:3303:33: sparse: expected struct hlist_head *n
net/xfrm/xfrm_state.c:3303:33: sparse: got struct hlist_head [noderef] __rcu *state_bydst
>> net/xfrm/xfrm_state.c:3320:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct hlist_head const *h @@ got struct hlist_head [noderef] __rcu * @@
net/xfrm/xfrm_state.c:3320:17: sparse: expected struct hlist_head const *h
net/xfrm/xfrm_state.c:3320:17: sparse: got struct hlist_head [noderef] __rcu *
net/xfrm/xfrm_state.c:3321:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct hlist_head const *h @@ got struct hlist_head [noderef] __rcu * @@
net/xfrm/xfrm_state.c:3321:17: sparse: expected struct hlist_head const *h
net/xfrm/xfrm_state.c:3321:17: sparse: got struct hlist_head [noderef] __rcu *
net/xfrm/xfrm_state.c:3322:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct hlist_head const *h @@ got struct hlist_head [noderef] __rcu * @@
net/xfrm/xfrm_state.c:3322:17: sparse: expected struct hlist_head const *h
net/xfrm/xfrm_state.c:3322:17: sparse: got struct hlist_head [noderef] __rcu *
net/xfrm/xfrm_state.c:3323:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct hlist_head const *h @@ got struct hlist_head [noderef] __rcu * @@
net/xfrm/xfrm_state.c:3323:17: sparse: expected struct hlist_head const *h
net/xfrm/xfrm_state.c:3323:17: sparse: got struct hlist_head [noderef] __rcu *
net/xfrm/xfrm_state.c:3327:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct hlist_head *n @@ got struct hlist_head [noderef] __rcu *state_byseq @@
net/xfrm/xfrm_state.c:3327:33: sparse: expected struct hlist_head *n
net/xfrm/xfrm_state.c:3327:33: sparse: got struct hlist_head [noderef] __rcu *state_byseq
net/xfrm/xfrm_state.c:3328:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct hlist_head *n @@ got struct hlist_head [noderef] __rcu *state_byspi @@
net/xfrm/xfrm_state.c:3328:33: sparse: expected struct hlist_head *n
net/xfrm/xfrm_state.c:3328:33: sparse: got struct hlist_head [noderef] __rcu *state_byspi
net/xfrm/xfrm_state.c:3329:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct hlist_head *n @@ got struct hlist_head [noderef] __rcu *state_bysrc @@
net/xfrm/xfrm_state.c:3329:33: sparse: expected struct hlist_head *n
net/xfrm/xfrm_state.c:3329:33: sparse: got struct hlist_head [noderef] __rcu *state_bysrc
net/xfrm/xfrm_state.c:3330:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct hlist_head *n @@ got struct hlist_head [noderef] __rcu *state_bydst @@
net/xfrm/xfrm_state.c:3330:33: sparse: expected struct hlist_head *n
net/xfrm/xfrm_state.c:3330:33: sparse: got struct hlist_head [noderef] __rcu *state_bydst
net/xfrm/xfrm_state.c: note: in included file (through include/linux/rbtree.h, include/linux/mm_types.h, include/linux/uio.h, ...):
include/linux/rcupdate.h:897:25: sparse: sparse: context imbalance in 'xfrm_register_type' - unexpected unlock
include/linux/rcupdate.h:897:25: sparse: sparse: context imbalance in 'xfrm_unregister_type' - unexpected unlock
include/linux/rcupdate.h:897:25: sparse: sparse: context imbalance in 'xfrm_get_type' - unexpected unlock
include/linux/rcupdate.h:897:25: sparse: sparse: context imbalance in 'xfrm_register_type_offload' - unexpected unlock
include/linux/rcupdate.h:897:25: sparse: sparse: context imbalance in 'xfrm_unregister_type_offload' - unexpected unlock
include/linux/rcupdate.h:897:25: sparse: sparse: context imbalance in 'xfrm_set_type_offload' - unexpected unlock
net/xfrm/xfrm_state.c:934:17: sparse: sparse: dereference of noderef expression
net/xfrm/xfrm_state.c:976:17: sparse: sparse: dereference of noderef expression
net/xfrm/xfrm_state.c:58:39: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct refcount_struct [usertype] *r @@ got struct refcount_struct [noderef] __rcu * @@
net/xfrm/xfrm_state.c:58:39: sparse: expected struct refcount_struct [usertype] *r
net/xfrm/xfrm_state.c:58:39: sparse: got struct refcount_struct [noderef] __rcu *
net/xfrm/xfrm_state.c:58:39: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct refcount_struct [usertype] *r @@ got struct refcount_struct [noderef] __rcu * @@
net/xfrm/xfrm_state.c:58:39: sparse: expected struct refcount_struct [usertype] *r
net/xfrm/xfrm_state.c:58:39: sparse: got struct refcount_struct [noderef] __rcu *
net/xfrm/xfrm_state.c:58:39: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct refcount_struct [usertype] *r @@ got struct refcount_struct [noderef] __rcu * @@
net/xfrm/xfrm_state.c:58:39: sparse: expected struct refcount_struct [usertype] *r
net/xfrm/xfrm_state.c:58:39: sparse: got struct refcount_struct [noderef] __rcu *
net/xfrm/xfrm_state.c:58:39: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct refcount_struct [usertype] *r @@ got struct refcount_struct [noderef] __rcu * @@
net/xfrm/xfrm_state.c:58:39: sparse: expected struct refcount_struct [usertype] *r
net/xfrm/xfrm_state.c:58:39: sparse: got struct refcount_struct [noderef] __rcu *
net/xfrm/xfrm_state.c:58:39: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct refcount_struct [usertype] *r @@ got struct refcount_struct [noderef] __rcu * @@
net/xfrm/xfrm_state.c:58:39: sparse: expected struct refcount_struct [usertype] *r
net/xfrm/xfrm_state.c:58:39: sparse: got struct refcount_struct [noderef] __rcu *
net/xfrm/xfrm_state.c:1655:9: sparse: sparse: dereference of noderef expression
net/xfrm/xfrm_state.c:58:39: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct refcount_struct [usertype] *r @@ got struct refcount_struct [noderef] __rcu * @@
net/xfrm/xfrm_state.c:58:39: sparse: expected struct refcount_struct [usertype] *r
net/xfrm/xfrm_state.c:58:39: sparse: got struct refcount_struct [noderef] __rcu *
net/xfrm/xfrm_state.c:1778:9: sparse: sparse: dereference of noderef expression
net/xfrm/xfrm_state.c:1814:9: sparse: sparse: dereference of noderef expression
net/xfrm/xfrm_state.c:2094:17: sparse: sparse: dereference of noderef expression
net/xfrm/xfrm_state.c:2113:17: sparse: sparse: dereference of noderef expression
net/xfrm/xfrm_state.c:2315:17: sparse: sparse: dereference of noderef expression
net/xfrm/xfrm_state.c: note: in included file:
include/net/xfrm.h:1971:16: sparse: sparse: incompatible types in comparison expression (different address spaces):
include/net/xfrm.h:1971:16: sparse: struct sock [noderef] __rcu *
include/net/xfrm.h:1971:16: sparse: struct sock *
vim +3320 net/xfrm/xfrm_state.c
3307
3308 void xfrm_state_fini(struct net *net)
3309 {
3310 unsigned int sz;
3311 int i;
3312
3313 flush_work(&net->xfrm.state_hash_work);
3314 xfrm_state_flush(net, 0, false);
3315 flush_work(&xfrm_state_gc_work);
3316
3317 WARN_ON(!list_empty(&net->xfrm.state_all));
3318
3319 for (i = 0; i <= net->xfrm.state_hmask; i++) {
> 3320 WARN_ON(!hlist_empty(net->xfrm.state_byseq + i));
3321 WARN_ON(!hlist_empty(net->xfrm.state_byspi + i));
3322 WARN_ON(!hlist_empty(net->xfrm.state_bysrc + i));
3323 WARN_ON(!hlist_empty(net->xfrm.state_bydst + i));
3324 }
3325
3326 sz = (net->xfrm.state_hmask + 1) * sizeof(struct hlist_head);
3327 xfrm_hash_free(net->xfrm.state_byseq, sz);
3328 xfrm_hash_free(net->xfrm.state_byspi, sz);
3329 xfrm_hash_free(net->xfrm.state_bysrc, sz);
3330 xfrm_hash_free(net->xfrm.state_bydst, sz);
3331 free_percpu(net->xfrm.state_cache_input);
3332 }
3333
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [PATCH ipsec 6/6] xfrm: check all hash buckets for leftover states during netns deletion
2025-10-17 15:10 ` kernel test robot
@ 2025-10-19 23:00 ` Sabrina Dubroca
2025-10-21 8:50 ` Steffen Klassert
0 siblings, 1 reply; 12+ messages in thread
From: Sabrina Dubroca @ 2025-10-19 23:00 UTC (permalink / raw)
To: steffen.klassert
Cc: netdev, oe-kbuild-all, kernel test robot, Alexey Dobriyan
Hi Steffen,
2025-10-17, 23:10:36 +0800, kernel test robot wrote:
> Hi Sabrina,
>
> kernel test robot noticed the following build warnings:
>
> [auto build test WARNING on klassert-ipsec-next/master]
> [also build test WARNING on klassert-ipsec/master net/main net-next/main linus/master v6.18-rc1 next-20251016]
> [If your patch is applied to the wrong git tree, kindly drop us a note.
> And when submitting patch, we suggest to use '--base' as documented in
> https://git-scm.com/docs/git-format-patch#_base_tree_information]
>
> url: https://github.com/intel-lab-lkp/linux/commits/Sabrina-Dubroca/xfrm-drop-SA-reference-in-xfrm_state_update-if-dir-doesn-t-match/20251016-184507
> base: https://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec-next.git master
> patch link: https://lore.kernel.org/r/2a743a05bbad7ebdc36c2c86a5fcbb9e99071c7b.1760610268.git.sd%40queasysnail.net
> patch subject: [PATCH ipsec 6/6] xfrm: check all hash buckets for leftover states during netns deletion
> config: x86_64-randconfig-r123-20251017 (https://download.01.org/0day-ci/archive/20251017/202510172159.iLR9bfcc-lkp@intel.com/config)
> compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251017/202510172159.iLR9bfcc-lkp@intel.com/reproduce)
>
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202510172159.iLR9bfcc-lkp@intel.com/
>
> sparse warnings: (new ones prefixed by >>)
[...]
> 3308 void xfrm_state_fini(struct net *net)
> 3309 {
> 3310 unsigned int sz;
> 3311 int i;
> 3312
> 3313 flush_work(&net->xfrm.state_hash_work);
> 3314 xfrm_state_flush(net, 0, false);
> 3315 flush_work(&xfrm_state_gc_work);
> 3316
> 3317 WARN_ON(!list_empty(&net->xfrm.state_all));
> 3318
> 3319 for (i = 0; i <= net->xfrm.state_hmask; i++) {
> > 3320 WARN_ON(!hlist_empty(net->xfrm.state_byseq + i));
So, before my patch there was a sparse waraning on the
WARN_ON(!hlist_empty(net->xfrm.state_by*));
lines, and now there's a sparse warning on the loop.
(and plenty on other lines in net/xfrm/xfrm_state.c)
This bot message gave me the push to finally take a look at all the
sparse warnings in net/xfrm/xfrm_state.c, I have solutions for a big
chunk of them (and a few in other files).
If you want to drop this patch from the set, I'll re-send it later, on
top of the sparse stuff. The rest of the series works without it. If
you want to take it as is, it doesn't change the sparse situation in
this file (a few warnings moved around) and I'll do the sparse
cleanups on top of it.
Thanks,
--
Sabrina
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [PATCH ipsec 6/6] xfrm: check all hash buckets for leftover states during netns deletion
2025-10-19 23:00 ` Sabrina Dubroca
@ 2025-10-21 8:50 ` Steffen Klassert
0 siblings, 0 replies; 12+ messages in thread
From: Steffen Klassert @ 2025-10-21 8:50 UTC (permalink / raw)
To: Sabrina Dubroca; +Cc: netdev, oe-kbuild-all, kernel test robot, Alexey Dobriyan
Hi Sabrina,
On Mon, Oct 20, 2025 at 01:00:42AM +0200, Sabrina Dubroca wrote:
> Hi Steffen,
>
> 2025-10-17, 23:10:36 +0800, kernel test robot wrote:
> > Hi Sabrina,
> >
> > kernel test robot noticed the following build warnings:
> >
> > [auto build test WARNING on klassert-ipsec-next/master]
> > [also build test WARNING on klassert-ipsec/master net/main net-next/main linus/master v6.18-rc1 next-20251016]
> > [If your patch is applied to the wrong git tree, kindly drop us a note.
> > And when submitting patch, we suggest to use '--base' as documented in
> > https://git-scm.com/docs/git-format-patch#_base_tree_information]
> >
> > url: https://github.com/intel-lab-lkp/linux/commits/Sabrina-Dubroca/xfrm-drop-SA-reference-in-xfrm_state_update-if-dir-doesn-t-match/20251016-184507
> > base: https://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec-next.git master
> > patch link: https://lore.kernel.org/r/2a743a05bbad7ebdc36c2c86a5fcbb9e99071c7b.1760610268.git.sd%40queasysnail.net
> > patch subject: [PATCH ipsec 6/6] xfrm: check all hash buckets for leftover states during netns deletion
> > config: x86_64-randconfig-r123-20251017 (https://download.01.org/0day-ci/archive/20251017/202510172159.iLR9bfcc-lkp@intel.com/config)
> > compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
> > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251017/202510172159.iLR9bfcc-lkp@intel.com/reproduce)
> >
> > If you fix the issue in a separate patch/commit (i.e. not just a new version of
> > the same patch/commit), kindly add following tags
> > | Reported-by: kernel test robot <lkp@intel.com>
> > | Closes: https://lore.kernel.org/oe-kbuild-all/202510172159.iLR9bfcc-lkp@intel.com/
> >
> > sparse warnings: (new ones prefixed by >>)
> [...]
> > 3308 void xfrm_state_fini(struct net *net)
> > 3309 {
> > 3310 unsigned int sz;
> > 3311 int i;
> > 3312
> > 3313 flush_work(&net->xfrm.state_hash_work);
> > 3314 xfrm_state_flush(net, 0, false);
> > 3315 flush_work(&xfrm_state_gc_work);
> > 3316
> > 3317 WARN_ON(!list_empty(&net->xfrm.state_all));
> > 3318
> > 3319 for (i = 0; i <= net->xfrm.state_hmask; i++) {
> > > 3320 WARN_ON(!hlist_empty(net->xfrm.state_byseq + i));
>
> So, before my patch there was a sparse waraning on the
>
> WARN_ON(!hlist_empty(net->xfrm.state_by*));
>
> lines, and now there's a sparse warning on the loop.
> (and plenty on other lines in net/xfrm/xfrm_state.c)
>
> This bot message gave me the push to finally take a look at all the
> sparse warnings in net/xfrm/xfrm_state.c, I have solutions for a big
> chunk of them (and a few in other files).
>
> If you want to drop this patch from the set, I'll re-send it later, on
> top of the sparse stuff. The rest of the series works without it. If
> you want to take it as is, it doesn't change the sparse situation in
> this file (a few warnings moved around) and I'll do the sparse
> cleanups on top of it.
I'll take the patchset as is and wait for your sparse fixes on top.
Thanks!
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH ipsec 0/6] xfrm: misc fixes
2025-10-16 10:39 [PATCH ipsec 0/6] xfrm: misc fixes Sabrina Dubroca
` (5 preceding siblings ...)
2025-10-16 10:39 ` [PATCH ipsec 6/6] xfrm: check all hash buckets for leftover states during netns deletion Sabrina Dubroca
@ 2025-10-22 5:42 ` Steffen Klassert
6 siblings, 0 replies; 12+ messages in thread
From: Steffen Klassert @ 2025-10-22 5:42 UTC (permalink / raw)
To: Sabrina Dubroca; +Cc: netdev
On Thu, Oct 16, 2025 at 12:39:11PM +0200, Sabrina Dubroca wrote:
> These are mostly independent fixes for small issues for state
> creation/modification/deletion (except for the 2 migrate patches).
>
> Sabrina Dubroca (6):
> xfrm: drop SA reference in xfrm_state_update if dir doesn't match
> xfrm: also call xfrm_state_delete_tunnel at destroy time for states
> that were never added
> xfrm: make state as DEAD before final put when migrate fails
> xfrm: call xfrm_dev_state_delete when xfrm_state_migrate fails to add
> the state
> xfrm: set err and extack on failure to create pcpu SA
> xfrm: check all hash buckets for leftover states during netns deletion
Series applied, thanks a lot Sabrina!
^ permalink raw reply [flat|nested] 12+ messages in thread