summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaura Abbott <labbott@redhat.com>2017-05-09 00:23:16 +0300
committerSasha Levin <alexander.levin@verizon.com>2017-06-26 05:02:21 +0300
commit49919278f4ce90fe58a0c135ea8f3280b3e1e66e (patch)
tree84132e917e33d130f403214f09b246503f898f6e
parentdaccc774edf2011ce0dfd6083b71f6eb87535d48 (diff)
downloadlinux-49919278f4ce90fe58a0c135ea8f3280b3e1e66e.tar.xz
x86/mm/32: Set the '__vmalloc_start_set' flag in initmem_init()
[ Upstream commit 861ce4a3244c21b0af64f880d5bfe5e6e2fb9e4a ] '__vmalloc_start_set' currently only gets set in initmem_init() when !CONFIG_NEED_MULTIPLE_NODES. This breaks detection of vmalloc address with virt_addr_valid() with CONFIG_NEED_MULTIPLE_NODES=y, causing a kernel crash: [mm/usercopy] 517e1fbeb6: kernel BUG at arch/x86/mm/physaddr.c:78! Set '__vmalloc_start_set' appropriately for that case as well. Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Laura Abbott <labbott@redhat.com> Reviewed-by: Kees Cook <keescook@chromium.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Fixes: dc16ecf7fd1f ("x86-32: use specific __vmalloc_start_set flag in __virt_addr_valid") Link: http://lkml.kernel.org/r/1494278596-30373-1-git-send-email-labbott@redhat.com Signed-off-by: Ingo Molnar <mingo@kernel.org> Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
-rw-r--r--arch/x86/mm/numa_32.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/mm/numa_32.c b/arch/x86/mm/numa_32.c
index 47b6436e41c2..3686a1db25b2 100644
--- a/arch/x86/mm/numa_32.c
+++ b/arch/x86/mm/numa_32.c
@@ -100,5 +100,6 @@ void __init initmem_init(void)
printk(KERN_DEBUG "High memory starts at vaddr %08lx\n",
(ulong) pfn_to_kaddr(highstart_pfn));
+ __vmalloc_start_set = true;
setup_bootmem_allocator();
}