[PATCH] mm: kvmalloc: Bail if called with soft or hard IRQs disabled
Herbert Xu
herbert at gondor.apana.org.au
Fri Nov 13 16:35:42 PST 2026
On Fri, Nov 13, 2026 at 09:47:13AM -0800, Linus Torvalds wrote:
>
> I don't think this is wrong, but I do wonder if we should at least
> have *some* way to detect these cases and report them.
That would make sense for direct vmalloc calls. But this is
kvmalloc, which is supposed to choose automatically between
kmalloc and vmalloc.
It was you who suggested moving this check from the caller into
kvmalloc (2018):
https://lore.kernel.org/all/CA+55aFxvNCEBQsxfr=yL3jgxiC8M8wY2MHwVBH+T8qSWyP-WPg@mail.gmail.com/
That worked perfectly until kvmalloc started allowing vmalloc for
non-blocking callers (2025):
https://lore.kernel.org/all/20251007122035.56347-1-urezki@gmail.com/
Thanks,
--
Email: Herbert Xu <herbert at gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
More information about the maple-tree
mailing list