On Mon, 19 Aug 2024 at 10:12, Michal Hocko <mho...@suse.com> wrote: > > Whether to BUG_ON or simply loop for ever in the allocator if somebody > requests non-sleeping NOFAIL allocation is a different story.
Just return NULL. The bug isn't in the VM. It's in the caller. Don't take on other peoples problems. It was never valid to say "I want to allocate lots of memory and you can't fail". Don't validate that kind of bogus behavior, just tell them "you're bad" and return NULL. Linus