# git rev-parse -q --verify 75ecfb49516c53da00c57b9efe48fa3f5504a791^{commit} 75ecfb49516c53da00c57b9efe48fa3f5504a791 already have revision, skipping fetch # git checkout -q -f -B kisskb 75ecfb49516c53da00c57b9efe48fa3f5504a791 # git clean -qxdf # < git log -1 # commit 75ecfb49516c53da00c57b9efe48fa3f5504a791 # Author: Mahesh Salgaonkar # Date: Mon Apr 23 10:29:27 2018 +0530 # # powerpc/mce: Fix a bug where mce loops on memory UE. # # The current code extracts the physical address for UE errors and then # hooks it up into memory failure infrastructure. On successful # extraction of physical address it wrongly sets "handled = 1" which # means this UE error has been recovered. Since MCE handler gets return # value as handled = 1, it assumes that error has been recovered and # goes back to same NIP. This causes MCE interrupt again and again in a # loop leading to hard lockup. # # Also, initialize phys_addr to ULONG_MAX so that we don't end up # queuing undesired page to hwpoison. # # Without this patch we see: # Severe Machine check interrupt [Recovered] # NIP: [000000001002588c] PID: 7109 Comm: find # Initiator: CPU # Error type: UE [Load/Store] # Effective address: 00007fffd2755940 # Physical address: 000020181a080000 # ... # Severe Machine check interrupt [Recovered] # NIP: [000000001002588c] PID: 7109 Comm: find # Initiator: CPU # Error type: UE [Load/Store] # Effective address: 00007fffd2755940 # Physical address: 000020181a080000 # Severe Machine check interrupt [Recovered] # NIP: [000000001002588c] PID: 7109 Comm: find # Initiator: CPU # Error type: UE [Load/Store] # Effective address: 00007fffd2755940 # Physical address: 000020181a080000 # Memory failure: 0x20181a08: recovery action for dirty LRU page: Recovered # Memory failure: 0x20181a08: already hardware poisoned # Memory failure: 0x20181a08: already hardware poisoned # Memory failure: 0x20181a08: already hardware poisoned # Memory failure: 0x20181a08: already hardware poisoned # Memory failure: 0x20181a08: already hardware poisoned # Memory failure: 0x20181a08: already hardware poisoned # ... # Watchdog CPU:38 Hard LOCKUP # # After this patch we see: # # Severe Machine check interrupt [Not recovered] # NIP: [00007fffaae585f4] PID: 7168 Comm: find # Initiator: CPU # Error type: UE [Load/Store] # Effective address: 00007fffaafe28ac # Physical address: 00002017c0bd0000 # find[7168]: unhandled signal 7 at 00007fffaae585f4 nip 00007fffaae585f4 lr 00007fffaae585e0 code 4 # Memory failure: 0x2017c0bd: recovery action for dirty LRU page: Recovered # # Fixes: 01eaac2b0591 ("powerpc/mce: Hookup ierror (instruction) UE errors") # Fixes: ba41e1e1ccb9 ("powerpc/mce: Hookup derror (load/store) UE errors") # Cc: stable@vger.kernel.org # v4.15+ # Signed-off-by: Mahesh Salgaonkar # Signed-off-by: Balbir Singh # Reviewed-by: Balbir Singh # Signed-off-by: Michael Ellerman # < /opt/cross/kisskb/gcc-4.6.3-nolibc/powerpc-linux/bin/powerpc-linux-gcc --version # < git log --format=%s --max-count=1 75ecfb49516c53da00c57b9efe48fa3f5504a791 # < make -s -j 8 ARCH=powerpc O=/kisskb/build/powerpc-fixes_44x_rainier_defconfig_powerpc CROSS_COMPILE=/opt/cross/kisskb/gcc-4.6.3-nolibc/powerpc-linux/bin/powerpc-linux- 44x/rainier_defconfig # make -s -j 8 ARCH=powerpc O=/kisskb/build/powerpc-fixes_44x_rainier_defconfig_powerpc CROSS_COMPILE=/opt/cross/kisskb/gcc-4.6.3-nolibc/powerpc-linux/bin/powerpc-linux- /kisskb/src/kernel/printk/printk.c: In function 'devkmsg_sysctl_set_loglvl': /kisskb/src/kernel/printk/printk.c:183:16: warning: 'old' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/fs/proc/inode.c: In function 'proc_reg_open': /kisskb/src/include/linux/list.h:65:12: warning: 'pdeo' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/fs/proc/inode.c:340:21: note: 'pdeo' was declared here /kisskb/src/drivers/tty/serial/8250/8250_core.c: In function 'univ8250_release_irq': /kisskb/src/drivers/tty/serial/8250/8250_core.c:251:18: warning: 'i' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/drivers/tty/serial/8250/8250_core.c:231:19: note: 'i' was declared here arch/powerpc/boot/rainier.dtb: Warning (pci_bridge): /plb/pci@1ec000000: missing bus-range for PCI bridge arch/powerpc/boot/rainier.dtb: Warning (pci_device_bus_num): Failed prerequisite 'pci_bridge' INFO: Uncompressed kernel (size 0x4576f4) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0x500000) Image Name: Linux-4.17.0-rc2-g75ecfb4 Created: Tue Apr 24 14:48:48 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 2189073 Bytes = 2137.77 kB = 2.09 MB Load Address: 00500000 Entry Point: 0050110c Completed OK # rm -rf /kisskb/build/powerpc-fixes_44x_rainier_defconfig_powerpc # Build took: 0:00:44.437528