Skip to content
Commit 653deee4 authored by Song Shuai's avatar Song Shuai Committed by Greg Kroah-Hartman
Browse files

riscv: kexec: Avoid deadlock in kexec crash path

[ Upstream commit c562ba71 ]

If the kexec crash code is called in the interrupt context, the
machine_kexec_mask_interrupts() function will trigger a deadlock while
trying to acquire the irqdesc spinlock and then deactivate irqchip in
irq_set_irqchip_state() function.

Unlike arm64, riscv only requires irq_eoi handler to complete EOI and
keeping irq_set_irqchip_state() will only leave this possible deadlock
without any use. So we simply remove it.

Link: https://lore.kernel.org/linux-riscv/20231208111015.173237-1-songshuaishuai@tinylab.org/


Fixes: b17d19a5 ("riscv: kexec: Fixup irq controller broken in kexec crash path")
Signed-off-by: default avatarSong Shuai <songshuaishuai@tinylab.org>
Reviewed-by: default avatarRyo Takakura <takakura@valinux.co.jp>
Link: https://lore.kernel.org/r/20240626023316.539971-1-songshuaishuai@tinylab.org


Signed-off-by: default avatarPalmer Dabbelt <palmer@rivosinc.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent b610a875
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment