On Mon, 2018-04-23 at 04:59:27 UTC, Mahesh J Salgaonkar wrote: > From: Mahesh Salgaonkar <mah...@linux.vnet.ibm.com> > > 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: > [ 1476.541984] Severe Machine check interrupt [Recovered] > [ 1476.541985] NIP: [000000001002588c] PID: 7109 Comm: find > [ 1476.541986] Initiator: CPU > [ 1476.541987] Error type: UE [Load/Store] > [ 1476.541988] Effective address: 00007fffd2755940 > [ 1476.541989] Physical address: 000020181a080000 > [...] > [ 1476.542003] Severe Machine check interrupt [Recovered] > [ 1476.542004] NIP: [000000001002588c] PID: 7109 Comm: find > [ 1476.542005] Initiator: CPU > [ 1476.542006] Error type: UE [Load/Store] > [ 1476.542006] Effective address: 00007fffd2755940 > [ 1476.542007] Physical address: 000020181a080000 > [ 1476.542010] Severe Machine check interrupt [Recovered] > [ 1476.542012] NIP: [000000001002588c] PID: 7109 Comm: find > [ 1476.542013] Initiator: CPU > [ 1476.542014] Error type: UE [Load/Store] > [ 1476.542015] Effective address: 00007fffd2755940 > [ 1476.542016] Physical address: 000020181a080000 > [ 1476.542448] Memory failure: 0x20181a08: recovery action for dirty LRU > page: Recovered > [ 1476.542452] Memory failure: 0x20181a08: already hardware poisoned > [ 1476.542453] Memory failure: 0x20181a08: already hardware poisoned > [ 1476.542454] Memory failure: 0x20181a08: already hardware poisoned > [ 1476.542455] Memory failure: 0x20181a08: already hardware poisoned > [ 1476.542456] Memory failure: 0x20181a08: already hardware poisoned > [ 1476.542457] Memory failure: 0x20181a08: already hardware poisoned > [...] > [ 1490.972174] Watchdog CPU:38 Hard LOCKUP > > After this patch we see: > > [ 325.384336] Severe Machine check interrupt [Not recovered] > [ 325.384338] NIP: [00007fffaae585f4] PID: 7168 Comm: find > [ 325.384339] Initiator: CPU > [ 325.384341] Error type: UE [Load/Store] > [ 325.384343] Effective address: 00007fffaafe28ac > [ 325.384345] Physical address: 00002017c0bd0000 > [ 325.384350] find[7168]: unhandled signal 7 at 00007fffaae585f4 nip > 00007fffaae585f4 lr 00007fffaae585e0 code 4 > [ 325.388574] 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") > Signed-off-by: Mahesh Salgaonkar <mah...@linux.vnet.ibm.com> > Signed-off-by: Balbir Singh <bsinghar...@gmail.com> > Reviewed-by: Balbir Singh <bsinghar...@gmail.com>
Applied to powerpc fixes, thanks. https://git.kernel.org/powerpc/c/75ecfb49516c53da00c57b9efe48fa cheers