[PATCH] mm/hugetlb: Don't crash when allocating a folio if there are no resv
Andrew Morton
akpm at linux-foundation.org
Thu Jun 19 00:02:48 UTC 2025
On Wed, 18 Jun 2025 12:14:49 +0530 Anshuman Khandual <anshuman.khandual at arm.com> wrote:
> > Therefore, prevent the above crash by replacing the VM_BUG_ON()
> > with WARN_ON_ONCE() as there is no need to crash the system in
> > this situation and instead we could just warn and fail the
> > allocation.
>
> Why there are no reserved huge pages in such situations and also how
> likely this might happen ? Is it recoverable ?
I'm suspecting we don't know.
> >
> > Fixes: 26a8ea80929c ("mm/hugetlb: fix memfd_pin_folios resv_huge_pages leak")
How was this arrived at? This is merely the patch which added the assertion.
> > Reported-by: syzbot+a504cb5bae4fe117ba94 at syzkaller.appspotmail.com
> > Closes: https://syzkaller.appspot.com/bug?extid=a504cb5bae4fe117ba94
I can't find any mailing report/discussion of this. The Closes: takes
us to the syskaller report which is a bit of a dead end.
I agree with the patch - converting a BUG into a WARN+recover is a good
thing but as far as I can tell, we don't know what's causing this
situation.
syskaller has a C reproducer, if anyone is feeling brave.
More information about the dri-devel
mailing list