From 975fb682de089abc7e24b779cb33a43be49bc9ae Mon Sep 17 00:00:00 2001 From: Suren Baghdasaryan Date: Tue, 22 Nov 2022 11:37:46 -0800 Subject: [PATCH] ANDROID: mm: disable speculative page faults for CONFIG_NUMA NUMA support with speculative page faults might be broken if vma_replace_policy() replaces the mempolicy object used in do_anonymous_page() alloc_zeroed_user_highpage_movable() alloc_page_vma() alloc_pages_vma() get_vma_policy() __get_vma_policy() in speculative path does not always refcounts the mempolicy object, therefore can't be relied on stabilizing it. Rather than fixing this, just disable speculation for CONFIG_NUMA for now and fix it if it's ever needed in Android. Bug: 257443051 Change-Id: Ib5750b9809979a69a42ebfa6c130e123f416f1aa Signed-off-by: Suren Baghdasaryan Signed-off-by: Lee Jones --- mm/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/Kconfig b/mm/Kconfig index 6a020a0d7bc5..03bfe7bd8183 100644 --- a/mm/Kconfig +++ b/mm/Kconfig @@ -843,7 +843,7 @@ config SPECULATIVE_PAGE_FAULT bool "Speculative page faults" default y depends on ARCH_SUPPORTS_SPECULATIVE_PAGE_FAULT - depends on MMU && SMP + depends on MMU && SMP && !NUMA help Try to handle user space page faults without holding the mmap_sem.