• Ying Xue's avatar
    tipc: fix lockdep warning during bearer initialization · 0aa1feda
    Ying Xue authored
    [ Upstream commit 4225a398 ]
    
    When the lockdep validator is enabled, it will report the below
    warning when we enable a TIPC bearer:
    
    [ INFO: possible irq lock inversion dependency detected ]
    ---------------------------------------------------------
    Possible interrupt unsafe locking scenario:
    
            CPU0                    CPU1
            ----                    ----
       lock(ptype_lock);
                                    local_irq_disable();
                                    lock(tipc_net_lock);
                                    lock(ptype_lock);
       <Interrupt>
       lock(tipc_net_lock);
    
      *** DEADLOCK ***
    
    the shortest dependencies between 2nd lock and 1st lock:
      -> (ptype_lock){+.+...} ops: 10 {
    [...]
    SOFTIRQ-ON-W at:
                          [<c1089418>] __lock_acquire+0x528/0x13e0
                          [<c108a360>] lock_acquire+0x90/0x100
                          [<c1553c38>] _raw_spin_lock+0x38/0x50
                          [<c14651...
    0aa1feda
eth_media.c 10.7 KB