Commit f29e0e1c authored by Yu Liao's avatar Yu Liao
Browse files

arm64: entry: fix ABBA deadlock when el1_dbg preempts rq->lock context

hulk inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I7DAV3


CVE: NA

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

When arm64 enters el1_dbg, it will hold rcu_node lock. If rq_lock critical
section is preempted by el1_dbg, it may cause an ABBA deadlock. The
scenario is as follows:

CPU0 			CPU1
---- 			----
process			context rcu_gp_fqs()

lock(&rq->lock);
			lock(rcu_node_0);
			lock(&rq->lock);
//el1_dbg()
lock(rcu_node_0);

rcu_nmi_enter() do not hold rcu_node in the nmi context, so fix this issue
by keeping the same logical for el1_dbg without marking el1_dbg as nmi.

Fixes: d8bb6718 ("arm64: Make debug exception handlers visible from RCU")
Signed-off-by: default avatarYu Liao <liaoyu15@huawei.com>
parent 0e6a6ad6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment