]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
kfence: skip __GFP_THISNODE allocations on NUMA systems
authorMarco Elver <elver@google.com>
Fri, 24 Jan 2025 12:01:38 +0000 (13:01 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Feb 2025 12:49:48 +0000 (13:49 +0100)
commit621b80eb88d7bd94e40e7b0234c6efce971b2edd
tree0d091f2a5a71af4a49f7d167a6f4ff9df80192ea
parentaa2ed4ee8d688e9e188274149b26b5de5955f4b7
kfence: skip __GFP_THISNODE allocations on NUMA systems

commit e64f81946adf68cd75e2207dd9a51668348a4af8 upstream.

On NUMA systems, __GFP_THISNODE indicates that an allocation _must_ be on
a particular node, and failure to allocate on the desired node will result
in a failed allocation.

Skip __GFP_THISNODE allocations if we are running on a NUMA system, since
KFENCE can't guarantee which node its pool pages are allocated on.

Link: https://lkml.kernel.org/r/20250124120145.410066-1-elver@google.com
Fixes: 236e9f153852 ("kfence: skip all GFP_ZONEMASK allocations")
Signed-off-by: Marco Elver <elver@google.com>
Reported-by: Vlastimil Babka <vbabka@suse.cz>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Cc: Christoph Lameter <cl@linux.com>
Cc: Alexander Potapenko <glider@google.com>
Cc: Chistoph Lameter <cl@linux.com>
Cc: Dmitriy Vyukov <dvyukov@google.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
mm/kfence/core.c