Commit ff96a025 authored by D Scott Phillips's avatar D Scott Phillips Committed by sanglipeng
Browse files

arm64: sdei: abort running SDEI handlers during crash

stable inclusion
from stable-v5.10.195
commit e7ed3585d09289da43f5d5e84b21f563c01678e5
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I95JOC

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=e7ed3585d09289da43f5d5e84b21f563c01678e5



--------------------------------

[ Upstream commit 5cd474e5 ]

Interrupts are blocked in SDEI context, per the SDEI spec: "The client
interrupts cannot preempt the event handler." If we crashed in the SDEI
handler-running context (as with ACPI's AGDI) then we need to clean up the
SDEI state before proceeding to the crash kernel so that the crash kernel
can have working interrupts.

Track the active SDEI handler per-cpu so that we can COMPLETE_AND_RESUME
the handler, discarding the interrupted context.

Fixes: f5df2696 ("arm64: kernel: Add arch-specific SDEI entry code and CPU masking")
Signed-off-by: default avatarD Scott Phillips <scott@os.amperecomputing.com>
Cc: stable@vger.kernel.org
Reviewed-by: default avatarJames Morse <james.morse@arm.com>
Tested-by: default avatarMihai Carabas <mihai.carabas@oracle.com>
Link: https://lore.kernel.org/r/20230627002939.2758-1-scott@os.amperecomputing.com


Signed-off-by: default avatarWill Deacon <will@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent e7a2419b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment