# git rev-parse -q --verify 4aa9fc2a435abe95a1e8d7f8c7b3d6356514b37a^{commit} 4aa9fc2a435abe95a1e8d7f8c7b3d6356514b37a already have revision, skipping fetch # git checkout -q -f -B kisskb 4aa9fc2a435abe95a1e8d7f8c7b3d6356514b37a # git clean -qxdf # < git log -1 # commit 4aa9fc2a435abe95a1e8d7f8c7b3d6356514b37a # Author: Michal Hocko # Date: Fri Jan 25 19:08:58 2019 +0100 # # Revert "mm, memory_hotplug: initialize struct pages for the full memory section" # # This reverts commit 2830bf6f05fb3e05bc4743274b806c821807a684. # # 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 # Fixes: 2830bf6f05fb ("mm, memory_hotplug: initialize struct pages for the full memory section") # Cc: stable@kernel.org # Signed-off-by: Michal Hocko # Signed-off-by: Linus Torvalds # < /opt/cross/kisskb/br-aarch64-glibc-2016.08-613-ge98b4dd/bin/aarch64-linux-gcc --version # < /opt/cross/kisskb/br-aarch64-glibc-2016.08-613-ge98b4dd/bin/aarch64-linux-ld --version # < git log --format=%s --max-count=1 4aa9fc2a435abe95a1e8d7f8c7b3d6356514b37a # < make -s -j 48 ARCH=arm64 O=/kisskb/build/linus_arm64-allmodconfig_arm64-gcc5.4 CROSS_COMPILE=/opt/cross/kisskb/br-aarch64-glibc-2016.08-613-ge98b4dd/bin/aarch64-linux- allmodconfig # make -s -j 48 ARCH=arm64 O=/kisskb/build/linus_arm64-allmodconfig_arm64-gcc5.4 CROSS_COMPILE=/opt/cross/kisskb/br-aarch64-glibc-2016.08-613-ge98b4dd/bin/aarch64-linux- arch/arm64/Makefile:27: ld does not support --fix-cortex-a53-843419; kernel may be susceptible to erratum arch/arm64/Makefile:40: LSE atomics not supported by binutils /kisskb/src/arch/arm64/boot/dts/rockchip/rk3399-gru-kevin.dts:46.9-50.5: Warning (graph_port): /edp-panel/ports: graph port node name should be 'port' /kisskb/src/arch/arm64/boot/dts/rockchip/rk3399-gru-bob.dts:25.9-29.5: Warning (graph_port): /edp-panel/ports: graph port node name should be 'port' /kisskb/src/arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dts:94.9-98.5: Warning (graph_port): /edp-panel/ports: graph port node name should be 'port' In file included from /kisskb/src/include/asm-generic/bug.h:18:0, from /kisskb/src/arch/arm64/include/asm/bug.h:37, from /kisskb/src/include/linux/bug.h:5, from /kisskb/src/include/linux/mmdebug.h:5, from /kisskb/src/include/linux/mm.h:9, from /kisskb/src/drivers/dma/imx-dma.c:14: /kisskb/src/drivers/dma/imx-dma.c: In function 'imxdma_sg_next': /kisskb/src/include/linux/kernel.h:846:29: warning: comparison of distinct pointer types lacks a cast (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1))) ^ /kisskb/src/include/linux/kernel.h:860:4: note: in expansion of macro '__typecheck' (__typecheck(x, y) && __no_side_effects(x, y)) ^ /kisskb/src/include/linux/kernel.h:870:24: note: in expansion of macro '__safe_cmp' __builtin_choose_expr(__safe_cmp(x, y), \ ^ /kisskb/src/include/linux/kernel.h:879:19: note: in expansion of macro '__careful_cmp' #define min(x, y) __careful_cmp(x, y, <) ^ /kisskb/src/drivers/dma/imx-dma.c:288:8: note: in expansion of macro 'min' now = min(d->len, sg_dma_len(sg)); ^ /kisskb/src/drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_crat.c:866:5: warning: "CONFIG_X86_64" is not defined [-Wundef] #if CONFIG_X86_64 ^ In file included from /kisskb/src/include/linux/rwsem.h:16:0, from /kisskb/src/include/linux/notifier.h:15, from /kisskb/src/include/linux/clk.h:17, from /kisskb/src/drivers/tty/serial/sh-sci.c:24: /kisskb/src/drivers/tty/serial/sh-sci.c: In function 'sci_submit_rx': /kisskb/src/include/linux/spinlock.h:279:3: warning: 'flags' may be used uninitialized in this function [-Wmaybe-uninitialized] _raw_spin_unlock_irqrestore(lock, flags); \ ^ /kisskb/src/drivers/tty/serial/sh-sci.c:1338:16: note: 'flags' was declared here unsigned long flags; ^ Completed OK # rm -rf /kisskb/build/linus_arm64-allmodconfig_arm64-gcc5.4 # Build took: 0:15:25.138298