From: Matthew Wilcox <willy@infradead.org>
To: Christoph Hellwig <hch@infradead.org>
Cc: SHAURYA RANE <ssrane_b23@ee.vjti.ac.in>,
akpm@linux-foundation.org, shakeel.butt@linux.dev,
eddyz87@gmail.com, andrii@kernel.org, ast@kernel.org,
linux-fsdevel@vger.kernel.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org,
linux-kernel-mentees@lists.linux.dev, skhan@linuxfoundation.org,
david.hunter.linux@gmail.com, khalid@kernel.org,
syzbot+09b7d050e4806540153d@syzkaller.appspotmail.com
Subject: Re: [PATCH] mm/filemap: fix NULL pointer dereference in do_read_cache_folio()
Date: Tue, 18 Nov 2025 12:51:50 +0000 [thread overview]
Message-ID: <aRxr5l-usmPvenbM@casper.infradead.org> (raw)
In-Reply-To: <aRv-jfh0WkVZLd_d@infradead.org>
On Mon, Nov 17, 2025 at 09:05:17PM -0800, Christoph Hellwig wrote:
> On Sun, Nov 16, 2025 at 10:32:12PM +0000, Matthew Wilcox wrote:
> > I don't think it's necessarily all that hard to make buildid work
> > for DAX. It's probably something like:
> >
> > if (IS_DAX(file_inode(file)))
> > kernel_read(file, buf, count, &pos);
> >
> > but that's just off the top of my head.
>
> The code should just unconditionally use kernel_read(). Relying
> on ->read_folio to just work is only something file system code and
> library code called by the file systems can assume.
>
> Something reading ELF headers has no bunsiness poking into this layer.
Please read the rest of the thread; this code can be called in contexts
that can't block. That was why I proposed the kiocb_read() refactoring
that I would expect you to have an opinion on.
next prev parent reply other threads:[~2025-11-18 12:52 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-14 19:37 [PATCH] mm/filemap: fix NULL pointer dereference in do_read_cache_folio() ssrane_b23
2025-11-14 20:44 ` Matthew Wilcox
2025-11-16 5:42 ` [PATCH v2] " ssrane_b23
2025-11-16 5:43 ` [PATCH] " SHAURYA RANE
2025-11-16 22:32 ` Matthew Wilcox
2025-11-17 14:10 ` Shaurya Rane
2025-11-17 18:42 ` Andrii Nakryiko
2025-11-17 16:41 ` Darrick J. Wong
2025-11-17 18:03 ` Matthew Wilcox
2025-11-17 18:45 ` Andrii Nakryiko
2025-11-18 13:03 ` Christoph Hellwig
2025-11-18 15:37 ` Matthew Wilcox
2025-11-18 16:12 ` Darrick J. Wong
2025-11-18 19:38 ` Andrii Nakryiko
2025-11-19 5:52 ` Christoph Hellwig
2025-11-19 6:29 ` Darrick J. Wong
2025-11-18 19:27 ` Andrii Nakryiko
2025-11-19 5:50 ` Christoph Hellwig
2025-11-19 17:12 ` Andrii Nakryiko
2025-12-17 7:33 ` Shakeel Butt
2025-11-18 5:05 ` Christoph Hellwig
2025-11-18 12:51 ` Matthew Wilcox [this message]
2025-11-18 12:56 ` Christoph Hellwig
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=aRxr5l-usmPvenbM@casper.infradead.org \
--to=willy@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=david.hunter.linux@gmail.com \
--cc=eddyz87@gmail.com \
--cc=hch@infradead.org \
--cc=khalid@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel-mentees@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=shakeel.butt@linux.dev \
--cc=skhan@linuxfoundation.org \
--cc=ssrane_b23@ee.vjti.ac.in \
--cc=syzbot+09b7d050e4806540153d@syzkaller.appspotmail.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.