From: "Jörn Engel" <joern@barelysecure.org>
To: Chris Roy <iam@thechris.in>
Cc: Richard Weinberger <richard@nod.at>,
Greg KH <gregkh@linuxfoundation.org>,
syzbot <syzbot+7cab6a19619f1b8efc00@syzkaller.appspotmail.com>,
dakr@kernel.org, driver-core@lists.linux.dev,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
rafael@kernel.org, syzkaller-bugs@googlegroups.com,
linux-mtd@lists.infradead.org, miquel.raynal@bootlin.com,
vigneshr@ti.com, Adarsh Das <adarshdas950@gmail.com>
Subject: Re: [syzbot] [fs?] possible deadlock in ovl_create_object (2)
Date: Sat, 19 Sep 2026 08:38:31 -0700 [thread overview]
Message-ID: <aq6sd2Z3nZuAYbMG@cashel.logfs.org> (raw)
In-Reply-To: <CAE2Bdm3K+ZnrfB7xzkg=2fzMs7AmJzdF3aYCpN00h90TR6FMog@mail.gmail.com>
On Sat, Sep 19, 2026 at 08:58:51PM +0530, Chris Roy wrote:
>
> I'd rather not bolt a redesign onto this fix.
Good decision!
> > Is this check necessary? [...] Looks like the kernel is still
> > undecided whether checks are necessary or not.
>
> I will keep it. kzalloc()/kstrdup() under plain GFP_KERNEL can still
> return NULL under real memory pressure (no __GFP_NOFAIL here), and
> dropping it would be inconsistent with the kstrdup() check two lines
> below.
My foggy mind is slowly waking up. GFP_ATOMIC can return NULL. If
you're trying to allocate memory from an interrupt handler or similar,
you cannot afford to wait for memory reclaim to happen. Those calls
definitely need a check and a reasonable plan what to do in case of
failure.
GFP_KERNEL should be able to block and wait, so there really is no
excuse for kmalloc to return NULL or for the callers to need a check.
But your decision of not pulling too many decisions into a single patch
is still a good decision. Even if my logic is sound, removing checks
from kmalloc callers should be a separate effort.
Jörn
--
I don't understand it. Nobody does.
-- Richard P. Feynman
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
WARNING: multiple messages have this Message-ID (diff)
From: "Jörn Engel" <joern@barelysecure.org>
To: Chris Roy <iam@thechris.in>
Cc: Richard Weinberger <richard@nod.at>,
Greg KH <gregkh@linuxfoundation.org>,
syzbot <syzbot+7cab6a19619f1b8efc00@syzkaller.appspotmail.com>,
dakr@kernel.org, driver-core@lists.linux.dev,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
rafael@kernel.org, syzkaller-bugs@googlegroups.com,
linux-mtd@lists.infradead.org, miquel.raynal@bootlin.com,
vigneshr@ti.com, Adarsh Das <adarshdas950@gmail.com>
Subject: Re: [syzbot] [fs?] possible deadlock in ovl_create_object (2)
Date: Sat, 19 Sep 2026 08:38:31 -0700 [thread overview]
Message-ID: <aq6sd2Z3nZuAYbMG@cashel.logfs.org> (raw)
In-Reply-To: <CAE2Bdm3K+ZnrfB7xzkg=2fzMs7AmJzdF3aYCpN00h90TR6FMog@mail.gmail.com>
On Sat, Sep 19, 2026 at 08:58:51PM +0530, Chris Roy wrote:
>
> I'd rather not bolt a redesign onto this fix.
Good decision!
> > Is this check necessary? [...] Looks like the kernel is still
> > undecided whether checks are necessary or not.
>
> I will keep it. kzalloc()/kstrdup() under plain GFP_KERNEL can still
> return NULL under real memory pressure (no __GFP_NOFAIL here), and
> dropping it would be inconsistent with the kstrdup() check two lines
> below.
My foggy mind is slowly waking up. GFP_ATOMIC can return NULL. If
you're trying to allocate memory from an interrupt handler or similar,
you cannot afford to wait for memory reclaim to happen. Those calls
definitely need a check and a reasonable plan what to do in case of
failure.
GFP_KERNEL should be able to block and wait, so there really is no
excuse for kmalloc to return NULL or for the callers to need a check.
But your decision of not pulling too many decisions into a single patch
is still a good decision. Even if my logic is sound, removing checks
from kmalloc callers should be a separate effort.
Jörn
--
I don't understand it. Nobody does.
-- Richard P. Feynman
next prev parent reply other threads:[~2026-09-19 15:38 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-09 15:19 [syzbot] [fs?] possible deadlock in ovl_create_object (2) syzbot
2026-09-12 13:12 ` syzbot
2026-09-16 19:48 ` Chris Roy
2026-09-16 21:37 ` Chris Roy
2026-09-16 21:52 ` syzbot
2026-09-17 6:44 ` Chris Roy
2026-09-17 6:59 ` syzbot
2026-09-17 7:33 ` Greg KH
2026-09-17 7:58 ` Chris Roy
2026-09-17 7:58 ` Chris Roy
2026-09-17 8:13 ` syzbot
2026-09-17 8:13 ` syzbot
2026-09-17 18:15 ` Jörn Engel
2026-09-17 18:15 ` Jörn Engel
2026-09-19 7:42 ` AW: " Richard Weinberger
2026-09-19 7:42 ` Richard Weinberger
2026-09-19 8:52 ` Chris Roy
2026-09-19 8:52 ` Chris Roy
2026-09-19 9:07 ` syzbot
2026-09-19 9:07 ` syzbot
2026-09-19 14:45 ` Jörn Engel
2026-09-19 14:45 ` Jörn Engel
2026-09-19 15:28 ` Chris Roy
2026-09-19 15:28 ` Chris Roy
2026-09-19 15:38 ` Jörn Engel [this message]
2026-09-19 15:38 ` Jörn Engel
2026-09-20 12:52 ` Miquel Raynal
2026-09-20 12:52 ` Miquel Raynal
2026-09-20 16:19 ` Jörn Engel
2026-09-20 16:19 ` Jörn Engel
2026-09-20 18:34 ` Chris Roy
2026-09-20 18:34 ` Chris Roy
2026-09-19 14:21 ` AW: " Jörn Engel
2026-09-19 14:21 ` Jörn Engel
2026-09-19 14:28 ` Richard Weinberger
2026-09-19 14:28 ` Richard Weinberger
2026-09-19 14:44 ` Chris Roy
2026-09-19 14:44 ` Chris Roy
2026-09-20 21:09 ` AW: " Richard Weinberger
2026-09-20 21:09 ` Richard Weinberger
2026-09-20 21:13 ` Chris Roy
2026-09-20 21:13 ` Chris Roy
2026-09-20 18:51 ` [PATCH v4] mtd: block2mtd: defer device open out of param/sysfs write Chris Roy
2026-09-20 19:03 ` sashiko-bot
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=aq6sd2Z3nZuAYbMG@cashel.logfs.org \
--to=joern@barelysecure.org \
--cc=adarshdas950@gmail.com \
--cc=dakr@kernel.org \
--cc=driver-core@lists.linux.dev \
--cc=gregkh@linuxfoundation.org \
--cc=iam@thechris.in \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=miquel.raynal@bootlin.com \
--cc=rafael@kernel.org \
--cc=richard@nod.at \
--cc=syzbot+7cab6a19619f1b8efc00@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
--cc=vigneshr@ti.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.