Re: [PATCH] mm/filemap: fix NULL pointer dereference in do_read_cache_folio()

Christoph Hellwig
2025-11-18T05:05:25Z

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.