mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 10:00:17 +00:00
hexagon: Fix unbalanced spinlock in die()
[ Upstream commit03410e8756] die executes holding the spinlock of &die.lock and unlock it after printing the oops message. However in the code if the notify_die() returns NOTIFY_STOP , die() exit with returning 1 but never unlocked the spinlock. Fix this by adding spin_unlock_irq(&die.lock) before returning. Fixes:cf9750bae2("Hexagon: Provide basic debugging and system trap support.") Signed-off-by: Lin Yujun <linyujun809@huawei.com> Link: https://lore.kernel.org/r/20230522025608.2515558-1-linyujun809@huawei.com Signed-off-by: Brian Cain <bcain@quicinc.com> Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
97517cba76
commit
aa420dee33
@@ -195,8 +195,10 @@ int die(const char *str, struct pt_regs *regs, long err)
|
|||||||
printk(KERN_EMERG "Oops: %s[#%d]:\n", str, ++die.counter);
|
printk(KERN_EMERG "Oops: %s[#%d]:\n", str, ++die.counter);
|
||||||
|
|
||||||
if (notify_die(DIE_OOPS, str, regs, err, pt_cause(regs), SIGSEGV) ==
|
if (notify_die(DIE_OOPS, str, regs, err, pt_cause(regs), SIGSEGV) ==
|
||||||
NOTIFY_STOP)
|
NOTIFY_STOP) {
|
||||||
|
spin_unlock_irq(&die.lock);
|
||||||
return 1;
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
print_modules();
|
print_modules();
|
||||||
show_regs(regs);
|
show_regs(regs);
|
||||||
|
|||||||
Reference in New Issue
Block a user