All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steffen Klassert <steffen.klassert@secunet.com>
To: Ren Wei <n05ec@lzu.edu.cn>
Cc: <netdev@vger.kernel.org>, <herbert@gondor.apana.org.au>,
	<davem@davemloft.net>, <sd@queasysnail.net>,
	<yuantan098@gmail.com>, <bird@lzu.edu.cn>, <tr0jan@lzu.edu.cn>,
	<zcliangcn@gmail.com>
Subject: Re: [PATCH net 1/1] xfrm: input: hold netns during deferred transport reinjection
Date: Tue, 26 May 2026 12:26:18 +0200	[thread overview]
Message-ID: <ahV1SnF_EnN_c2qe@secunet.com> (raw)
In-Reply-To: <a7cc27e87359c7624522fa5bb8c6a2d9af928824.1779308659.git.zcliangcn@gmail.com>

On Fri, May 22, 2026 at 05:31:55PM +0800, Ren Wei wrote:
> From: Zhengchuan Liang <zcliangcn@gmail.com>
> 
> Transport-mode reinjection stores a struct net pointer in skb->cb and
> uses it later from xfrm_trans_reinject(). That pointer must stay valid
> until the deferred callback runs.
> 
> Take a netns reference when queueing deferred reinjection work and drop
> it after the callback completes. Use maybe_get_net() so the queueing
> path does not revive a namespace that is already being torn down.
> 
> This keeps the existing workqueue design and fixes the netns lifetime
> handling in one place for all users of xfrm_trans_queue_net().
> 
> Fixes: 7b3801927e52 ("xfrm: introduce xfrm_trans_queue_net")
> Cc: stable@kernel.org
> Reported-by: Yuan Tan <yuantan098@gmail.com>
> Reported-by: Xin Liu <bird@lzu.edu.cn>
> Co-developed-by: Luxing Yin <tr0jan@lzu.edu.cn>
> Signed-off-by: Luxing Yin <tr0jan@lzu.edu.cn>
> Signed-off-by: Zhengchuan Liang <zcliangcn@gmail.com>
> Signed-off-by: Ren Wei <n05ec@lzu.edu.cn>
> Assisted-by: Codex:gpt-5.4

Applied, thanks a lot!

      reply	other threads:[~2026-05-26 10:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1779308659.git.zcliangcn@gmail.com>
2026-05-22  9:31 ` [PATCH net 1/1] xfrm: input: hold netns during deferred transport reinjection Ren Wei
2026-05-26 10:26   ` Steffen Klassert [this message]

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=ahV1SnF_EnN_c2qe@secunet.com \
    --to=steffen.klassert@secunet.com \
    --cc=bird@lzu.edu.cn \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=n05ec@lzu.edu.cn \
    --cc=netdev@vger.kernel.org \
    --cc=sd@queasysnail.net \
    --cc=tr0jan@lzu.edu.cn \
    --cc=yuantan098@gmail.com \
    --cc=zcliangcn@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.