From: Jason Gunthorpe <jgg@ziepe.ca>
To: "Liam R. Howlett" <liam@infradead.org>
Cc: "Vlastimil Babka (SUSE)" <vbabka@kernel.org>,
syzbot <syzbot+78a7af91b68fc6394771@syzkaller.appspotmail.com>,
akpm@linux-foundation.org, jannh@google.com,
linux-kernel@vger.kernel.org, linux-mm@kvack.org, ljs@kernel.org,
pfalcato@suse.de, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [mm?] WARNING in mas_nomem
Date: Fri, 7 Aug 2026 16:26:22 -0300 [thread overview]
Message-ID: <20260807192622.GK200537@ziepe.ca> (raw)
In-Reply-To: <pipldkadm5oy4olwticdjqfjz4ccn7jfqo3tdle4n2b4jtfmiq@5ckyybqnyk4m>
On Fri, Aug 07, 2026 at 03:24:24PM -0400, Liam R. Howlett wrote:
> On 26/08/07 09:19AM, Liam R. Howlett wrote:
> > On 26/08/06 12:48PM, Jason Gunthorpe wrote:
> > > On Thu, Aug 06, 2026 at 10:29:27AM -0400, Liam R. Howlett wrote:
> > >
> > > > @@ -5609,8 +5612,7 @@ void *mas_store(struct ma_state *mas, void *entry)
> > > > goto store;
> > > >
> > > > mas_alloc_nodes(mas, GFP_NOWAIT);
> > > > - if (mas_is_err(mas))
> > > > - return NULL;
> > > > + mas_nomem(mas, GFP_KERNEL | __GFP_NOFAIL);
> > >
> > > It still feels really weird to ignore the return code from mas_nomem..
> > >
> > > void mas_nomem_nofail()
> >
> > Sure, that's fair.
> >
> > >
> > > ? and maybe it can have a WARN_ON
> >
> >
> > The warning would never trigger. If the allocation fails with nofail,
> > then you'd never reach the warning.
>
> Upon rereading my reply, I don't think it was clear what's going to
> happen here.
>
> If there's really no memory and no reserves, then we're going to panic
> on trying to allocate. So, even if I rewrite this to have a void
> function to print a warning, it will never trigger, at that point why
> have another function? Are you looking to document what's happening in
> the code with this? If so, maybe a comment would be better.
Yeah, it is clearer to document it with a function that can't be
called wrong, IMHO
Jason
next prev parent reply other threads:[~2026-08-07 19:26 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-31 7:30 [syzbot] [mm?] WARNING in mas_nomem syzbot
2026-07-31 15:59 ` Liam R. Howlett
2026-07-31 16:07 ` Vlastimil Babka (SUSE)
2026-08-05 0:46 ` Jason Gunthorpe
2026-08-05 8:01 ` Vlastimil Babka (SUSE)
2026-08-06 14:29 ` Liam R. Howlett
2026-08-06 15:48 ` Jason Gunthorpe
2026-08-07 13:19 ` Liam R. Howlett
2026-08-07 19:24 ` Liam R. Howlett
2026-08-07 19:26 ` Jason Gunthorpe [this message]
2026-08-07 20:32 ` Liam R. Howlett
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=20260807192622.GK200537@ziepe.ca \
--to=jgg@ziepe.ca \
--cc=akpm@linux-foundation.org \
--cc=jannh@google.com \
--cc=liam@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ljs@kernel.org \
--cc=pfalcato@suse.de \
--cc=syzbot+78a7af91b68fc6394771@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
--cc=vbabka@kernel.org \
/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.