Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1669422

[PATCH 4.9 22/60] x86/mm/32: Set the __vmalloc_start_set flag in initmem_init()

From Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Newsgroups linux.kernel
Subject [PATCH 4.9 22/60] x86/mm/32: Set the __vmalloc_start_set flag in initmem_init()
Date 2017-06-19 18:10 +0200
Message-ID <tU7py-4Ul-75@gated-at.bofh.it> (permalink)
References <tU6MO-4pB-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Laura Abbott <labbott@redhat.com>

commit 861ce4a3244c21b0af64f880d5bfe5e6e2fb9e4a upstream.

'__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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/x86/mm/numa_32.c |    1 +
 1 file changed, 1 insertion(+)

--- 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();
 }

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 4.9 00/60] 4.9.34-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-19 18:10 +0200
  [PATCH 4.9 06/60] [media] vb2: Fix an off by one error in vb2_plane_vaddr Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-19 18:10 +0200
  [PATCH 4.9 14/60] mac80211: fix IBSS presp allocation size Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-19 18:10 +0200
  [PATCH 4.9 37/60] USB: gadget: dummy_hcd: fix hub-descriptor removable fields Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-19 18:10 +0200
  [PATCH 4.9 09/60] drm/amdgpu: Fix overflow of watermark calcs at > 4k resolutions. Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-19 18:10 +0200
  [PATCH 4.9 15/60] mac80211: strictly check mesh address extension mode Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-19 18:10 +0200
  [PATCH 4.9 22/60] x86/mm/32: Set the __vmalloc_start_set flag in initmem_init() Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-19 18:10 +0200
  [PATCH 4.9 13/60] mac80211: fix packet statistics for fast-RX Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-19 18:10 +0200

csiph-web