• Y
    arm64: entry: fix ABBA deadlock when el1_dbg preempts rq->lock context · f29e0e1c
    Yu Liao 提交于
    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: NYu Liao <liaoyu15@huawei.com>
    f29e0e1c
tree.c 145.3 KB