Thread (4 messages) flat view 4 messages, 4 authors, 2021-08-07

Re: [PATCH net-next] net: wwan: mhi_wwan_ctrl: Fix possible deadlock

From: Sergey Ryazanov <ryazanov.s.a@gmail.com>
Date: 2021-08-06 10:39:03
Also in: stable

On Fri, Aug 6, 2021 at 1:24 PM Loic Poulain [off-list ref] wrote:
Lockdep detected possible interrupt unsafe locking scenario:

        CPU0                    CPU1
        ----                    ----
   lock(&mhiwwan->rx_lock);
                               local_irq_disable();
                               lock(&mhi_cntrl->pm_lock);
                               lock(&mhiwwan->rx_lock);
   <Interrupt>
     lock(&mhi_cntrl->pm_lock);

  *** DEADLOCK ***

To prevent this we need to disable the soft-interrupts when taking
the rx_lock.

Cc: stable@vger.kernel.org
Fixes: fa588eba632d ("net: Add Qcom WWAN control driver")
Reported-by: Thomas Perrot <redacted>
Signed-off-by: Loic Poulain <redacted>
Reviewed-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help