From: Miquel Raynal <miquel.raynal@bootlin.com>
To: "Jörn Engel" <joern@barelysecure.org>
Cc: Chris Roy <iam@thechris.in>, 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, vigneshr@ti.com,
Adarsh Das <adarshdas950@gmail.com>
Subject: Re: [syzbot] [fs?] possible deadlock in ovl_create_object (2)
Date: Sun, 20 Sep 2026 14:52:18 +0200 [thread overview]
Message-ID: <87cxu8axvh.fsf@bootlin.com> (raw)
In-Reply-To: <aq6sd2Z3nZuAYbMG@cashel.logfs.org> (=?utf-8?Q?=22J=C3=B6rn?= Engel"'s message of "Sat, 19 Sep 2026 08:38:31 -0700")
Hi Jörn,
>> > 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.
Not saying this would be a bad move, it would be highly inconsistent
with the current code base. Every single allocation in the kernel is
checked. Such a change, without a documented and agreed upon method,
would lead to dozens fuzzing AIs sending patches to add the "missing"
check.
Thanks,
Miquèl
next prev parent reply other threads:[~2026-09-20 12:52 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-09 15:19 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 8:13 ` syzbot
2026-09-17 18:15 ` Jörn Engel
2026-09-19 7:42 ` AW: " Richard Weinberger
2026-09-19 8:52 ` Chris Roy
2026-09-19 9:07 ` syzbot
2026-09-19 14:45 ` Jörn Engel
2026-09-19 15:28 ` Chris Roy
2026-09-19 15:38 ` Jörn Engel
2026-09-20 12:52 ` Miquel Raynal [this message]
2026-09-20 16:19 ` Jörn Engel
2026-09-20 18:34 ` Chris Roy
2026-09-19 14:21 ` AW: " Jörn Engel
2026-09-19 14:28 ` Richard Weinberger
2026-09-19 14:44 ` 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=87cxu8axvh.fsf@bootlin.com \
--to=miquel.raynal@bootlin.com \
--cc=adarshdas950@gmail.com \
--cc=dakr@kernel.org \
--cc=driver-core@lists.linux.dev \
--cc=gregkh@linuxfoundation.org \
--cc=iam@thechris.in \
--cc=joern@barelysecure.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®