Re: [PATCH 2/2] powernv/kdump: Fix cases where the kdump kernel can get HMI's
From: Nicholas Piggin <npiggin@gmail.com>
Date: 2017-12-14 13:32:33
From: Nicholas Piggin <npiggin@gmail.com>
Date: 2017-12-14 13:32:33
On Thu, 14 Dec 2017 23:16:26 +1100 Balbir Singh [off-list ref] wrote:
On Thu, Dec 14, 2017 at 12:51 PM, Nicholas Piggin [off-list ref] wrote:
quoted
quoted
I can't call smp_send_nmi_ipi due to the nmi_ipi_busy_count and I'm worried about calling a stale nmi_ipi_function via the system_reset_exception path, if we are OK with it, I can revisit the code pathYou shouldn't get a stale one, that would also be a bug -- we have to cope with NMIs coming in at any time that are triggered externally (not by smp_send_nmi_ipi), so if you see any bugs there those need to be fixed separately.Yes, I think it's a bug, nothing clears nmi_ipi_function (from what I can see), so when the next NMI comes in and goes into pnv_system_reset_exception it'll execute the stale handler.
The CPU won't be in the nmi_ipi_pending_mask though, so it shouldn't get that far. You could add a bit of paranoia to clear the function pointer I suppose, but AFAIKS it's not needed.
I'll respin things based on the suggestion above and deal with any bugs as well.
Thanks, Nick