From: Leon Romanovsky <leonro@nvidia.com>
To: Sabrina Dubroca <sd@queasysnail.net>
Cc: <netdev@vger.kernel.org>, <steffen.klassert@secunet.com>,
Chiachang Wang <chiachangwang@google.com>
Subject: Re: [PATCH ipsec 4/6] xfrm: call xfrm_dev_state_delete when xfrm_state_migrate fails to add the state
Date: Sun, 19 Oct 2025 16:46:12 +0300 [thread overview]
Message-ID: <20251019134612.GJ6199@unreal> (raw)
In-Reply-To: <6e1c4b4505fa3d822e2e33b681ac4a44bae959ed.1760610268.git.sd@queasysnail.net>
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>
next prev parent reply other threads:[~2025-10-19 13:47 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` [PATCH ipsec 3/6] xfrm: make state as DEAD before final put when migrate fails 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
2025-10-19 13:46 ` Leon Romanovsky [this message]
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 ` [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
2025-10-21 8:50 ` Steffen Klassert
2025-10-22 5:42 ` [PATCH ipsec 0/6] xfrm: misc fixes Steffen Klassert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251019134612.GJ6199@unreal \
--to=leonro@nvidia.com \
--cc=chiachangwang@google.com \
--cc=netdev@vger.kernel.org \
--cc=sd@queasysnail.net \
--cc=steffen.klassert@secunet.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).