提交 4452cb82 编写于 作者: W Wei Li 提交者: Xie XiuQi

arm64: fix potential deadlock in arm64-provide-pseudo-NMI-with-GICv3

hulk inclusion
category: bugfix
bugzilla: 9291
CVE: NA

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

In some exception handlers, the interrupt is not reenabled by daifclr at first.
The later process may call local_irq_enable() to enable the interrupt, like
gic_handle_irq(). As we known, function local_irq_enable() just change the pmr now.
The following codes what i found may cause a deadlock or some issues else.
Signed-off-by: NWei Li <liwei391@huawei.com>
Reviewed-by: NHanjun Guo <guohanjun@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 72bcdbb9
......@@ -25,6 +25,7 @@
#include <linux/kgdb.h>
#include <linux/kprobes.h>
#include <linux/sched/task_stack.h>
#include <linux/irqchip/arm-gic-v3.h>
#include <asm/debug-monitors.h>
#include <asm/insn.h>
......@@ -291,6 +292,9 @@ static void kgdb_call_nmi_hook(void *ignored)
void kgdb_roundup_cpus(unsigned long flags)
{
if (gic_prio_masking_enabled())
gic_arch_enable_irqs();
local_irq_enable();
smp_call_function(kgdb_call_nmi_hook, NULL, 0);
local_irq_disable();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册