]> git.baikalelectronics.ru Git - kernel.git/commit
Revert "mm, memory_hotplug: initialize struct pages for the full memory section"
authorMichal Hocko <mhocko@suse.com>
Fri, 25 Jan 2019 18:08:58 +0000 (19:08 +0100)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 28 Jan 2019 18:35:22 +0000 (10:35 -0800)
commit8678908eb40428af8a0e0bf3787c7b6bbdf9781f
tree18fdac93ceb6768bfb1a380e586a5e7342ce40b7
parentbef19531c51083c8c9366cbaaf42eab91e2932f0
Revert "mm, memory_hotplug: initialize struct pages for the full memory section"

This reverts commit 5bc4eb8ff66a600382a0e6043bfc61a5b9568bdc.

The underlying assumption that one sparse section belongs into a single
numa node doesn't hold really. Robert Shteynfeld has reported a boot
failure. The boot log was not captured but his memory layout is as
follows:

  Early memory node ranges
    node   1: [mem 0x0000000000001000-0x0000000000090fff]
    node   1: [mem 0x0000000000100000-0x00000000dbdf8fff]
    node   1: [mem 0x0000000100000000-0x0000001423ffffff]
    node   0: [mem 0x0000001424000000-0x0000002023ffffff]

This means that node0 starts in the middle of a memory section which is
also in node1.  memmap_init_zone tries to initialize padding of a
section even when it is outside of the given pfn range because there are
code paths (e.g.  memory hotplug) which assume that the full worth of
memory section is always initialized.

In this particular case, though, such a range is already intialized and
most likely already managed by the page allocator.  Scribbling over
those pages corrupts the internal state and likely blows up when any of
those pages gets used.

Reported-by: Robert Shteynfeld <robert.shteynfeld@gmail.com>
Fixes: 5bc4eb8ff66a ("mm, memory_hotplug: initialize struct pages for the full memory section")
Cc: stable@kernel.org
Signed-off-by: Michal Hocko <mhocko@suse.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/page_alloc.c