Netdev List
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Zhao Dongdong <winter91@foxmail.com>
Cc: aleksander.lobakin@intel.com, davem@davemloft.net,
	edumazet@google.com, netdev@vger.kernel.org, pabeni@redhat.com,
	zhaodongdong@kylinos.cn
Subject: Re: [PATCH] net: page_pool: check nla_nest_start() return value in
Date: Wed, 27 May 2026 17:41:21 -0700	[thread overview]
Message-ID: <20260527174121.2289833e@kernel.org> (raw)
In-Reply-To: <tencent_F2C58937ADA208EE4219632E34ED23772F08@qq.com>

On Wed, 27 May 2026 15:51:22 +0800 Zhao Dongdong wrote:
> On Tue, 26 May 2026 16:27:36 -0700, Jakub Kicinski <kuba@kernel.org> wrote:
> >
> > On Tue, 26 May 2026 18:04:44 +0200 Alexander Lobakin wrote:  
> > > From: Zhao Dongdong <winter91@foxmail.com>
> > > Date: Tue, 26 May 2026 14:51:56 +0800
> > >   
>  [...]  
> > > 
> > > A "Cc: stable@vger.kernel.org" candidate?  
> >
> > Not really, the thinking is that if nla_nest_start() failed then the
> > very next nla_put* will also fail (nla_nest_start() is a zero-length
> > attr, any attr we put after must be >= in length).
> >
> > IOW the commit message is lying, there's no way for us to reach
> > nla_nest_end(). We will jump to nla_nest_cancel() which handles
> > nest=NULL just fine.
> >
> > Zhao Dongdong please confirm this and respin the patch without a Fixes 
> > tag and with an updated commit message. I think we got such a patch
> > in the past, so we should merge it to avoid confusing bots. 
> > But please make it very clear that this code can't crash..
> > -- 
> > pw-bot: cr  
> 
> Thanks for your review.
> I carefully reviewed the code. Your thinking should be right --I just happened to notice that most call sites of nla_nest_start() include a non-NULL check. Apologies for the noise.

I don't see a v2 so I'm just going to rewrite the commit msg myself and
commit this.

  reply	other threads:[~2026-05-28  0:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-26  6:51 [PATCH] net: page_pool: check nla_nest_start() return value in page_pool_nl_stats_fill() Zhao Dongdong
2026-05-26 16:04 ` Alexander Lobakin
2026-05-26 23:27   ` Jakub Kicinski
2026-05-27  7:51     ` [PATCH] net: page_pool: check nla_nest_start() return value in Zhao Dongdong
2026-05-28  0:41       ` Jakub Kicinski [this message]
2026-05-28  6:01         ` Zhao Dongdong
2026-05-28  0:50 ` [PATCH] net: page_pool: check nla_nest_start() return value in page_pool_nl_stats_fill() patchwork-bot+netdevbpf

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=20260527174121.2289833e@kernel.org \
    --to=kuba@kernel.org \
    --cc=aleksander.lobakin@intel.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=winter91@foxmail.com \
    --cc=zhaodongdong@kylinos.cn \
    /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