Re: [PATCH] gfs2: Fix error pointer dereference
From: Ethan Tidmore
Date: Wed Feb 18 2026 - 16:54:07 EST
On Wed Feb 18, 2026 at 3:14 PM CST, Matthew Wilcox wrote:
> On Wed, Feb 18, 2026 at 02:06:45PM -0600, Ethan Tidmore wrote:
>> The function __filemap_get_folio() can return an error pointer and is
>> not checked for one. Add check for error pointer.
>
> Can you explain how __filemap_get_folio() would fail, given the
> presence of __GFP_NOFAIL in the GFP flags?
>
I hadn't thought of that, looks like Smatch gave me a false positive. I
just saw the same function being called a few lines down and its return
value being checked for error pointer so I just assumed this one was
missing. Sorry about that.
Thanks,
ET