Files
erofs-linux/lib
Masami Hiramatsu (Google) cb6fcef8b4 objpool: fix to make percpu slot allocation more robust
Since gfp & GFP_ATOMIC == GFP_ATOMIC is true for GFP_KERNEL | GFP_HIGH, it
will use kmalloc if user specifies that combination.  Here the reason why
combining the __vmalloc_node() and kmalloc_node() is that the vmalloc does
not support all GFP flag, especially GFP_ATOMIC.  So we should check if
gfp & (GFP_ATOMIC | GFP_KERNEL) != GFP_ATOMIC for vmalloc first.  This
ensures caller can sleep.  And for the robustness, even if vmalloc fails,
it should retry with kmalloc to allocate it.

Link: https://lkml.kernel.org/r/173008598713.1262174.2959179484209897252.stgit@mhiramat.roam.corp.google.com
Fixes: aff1871bfc ("objpool: fix choosing allocation for percpu slots")
Signed-off-by: Masami Hiramatsu (Google) <[email protected]>
Reported-by: Linus Torvalds <[email protected]>
Closes: https://lore.kernel.org/all/CAHk-=whO+vSH+XVRio8byJU8idAWES0SPGVZ7KAVdc4qrV0VUA@mail.gmail.com/
Cc: Leo Yan <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Matt Wu <[email protected]>
Cc: Mikel Rychliski <[email protected]>
Cc: Steven Rostedt (Google) <[email protected]>
Cc: Viktor Malik <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
2024-11-07 14:14:58 -08:00
..
…
…
…
…
2024-07-12 16:39:53 -07:00
2024-02-01 13:06:40 +01:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2024-04-25 21:07:06 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
…
2024-06-25 17:15:06 -07:00
2024-04-25 21:07:05 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
2024-07-04 23:43:10 -07:00
…
2024-02-15 12:17:28 -05:00
…
…
2024-06-10 11:14:52 +01:00
2024-09-03 21:15:42 -07:00
…
…