Subject: Re: [PATCH] net: page_pool: check nla_nest_start() return value in

From: Jakub Kicinski <[email-masked]>
Date: Wed, 27 May 2026 17:41:21 -0700

On Wed, 27 May 2026 15:51:22 +0800 Zhao Dongdong wrote:
> On Tue, 26 May 2026 16:27:36 -0700, Jakub Kicinski <[email-masked]> wrote:
> >
> > On Tue, 26 May 2026 18:04:44 +0200 Alexander Lobakin wrote:  
> > > From: Zhao Dongdong <[email-masked]>
> > > Date: Tue, 26 May 2026 14:51:56 +0800
> > >   
>  [...]  
> > > 
> > > A "Cc: [email-masked]" 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.