]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
mm/vmalloc: clarify why vmap_range_noflush() might sleep
authorBrendan Jackman <jackmanb@google.com>
Mon, 15 Dec 2025 10:40:25 +0000 (10:40 +0000)
committerAndrew Morton <akpm@linux-foundation.org>
Wed, 21 Jan 2026 03:24:31 +0000 (19:24 -0800)
commita03ed8f144e2732dbfce05d4ee5576d77aba6957
tree577003f756c31a3442f0bc35e68d0b600b10d313
parent6c790212c588fddeb0d852f2790840753bb604b1
mm/vmalloc: clarify why vmap_range_noflush() might sleep

The only reason vmap_range_noflush() can sleep is because of pagetable
allocations.

The actual allocation mechanism is arch-specific so might_alloc() doesn't
work here (what GFP flags would be used?).  Hence, just add a comment.

Also note that this might do a TLB shootdown.  This is not actually
sleeping but it requires IRQs on for x86, and might_sleep() incidentally
serves to detect violations of that too.

Link: https://lkml.kernel.org/r/20251215-b4-vmalloc-might_alloc-v3-1-92dd8e406868@google.com
Signed-off-by: Brendan Jackman <jackmanb@google.com>
Reviewed-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/vmalloc.c