[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7de1e986-b6bc-8cf4-d5d6-259037fe7340@cornelisnetworks.com>
Date: Thu, 20 Oct 2022 12:15:35 -0400
From: Dennis Dalessandro <dennis.dalessandro@...nelisnetworks.com>
To: Jia-Ju Bai <baijiaju1990@...il.com>, jgg@...pe.ca,
Leon Romanovsky <leon@...nel.org>
Cc: linux-rdma@...r.kernel.org,
linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [BUG] infiniband: sw: rdmavt: possible ABBA deadlocks in
rvt_ruc_loopback()
On 10/20/22 9:37 AM, Jia-Ju Bai wrote:
> Hello,
>
> My static analysis tool reports several possible ABBA deadlock in the
> rdmavt driver in Linux 5.18:
>
> rvt_ruc_loopback()
> spin_lock_irqsave(&sqp->s_lock, flags); --> Line 3190 (Lock A)
> spin_lock(&sqp->r_lock); --> Line 3195 (Lock B)
>
> rvt_qp_mr_clean()
> spin_lock_irq(&qp->r_lock); --> Line 698 (Lock B)
> spin_lock(&qp->s_lock); --> Line 700 (Lock A)
>
> rvt_rc_timeout()
> spin_lock_irqsave(&qp->r_lock, flags); --> Line 2595 (Lock B)
> spin_lock(&qp->s_lock); --> Line 2596 (Lock A)
>
> rvt_modify_qp()
> spin_lock_irq(&qp->r_lock); --> Line 1419 (Lock B)
> spin_lock(&qp->s_lock); --> Line 1421(Lock A)
>
> _rvt_reset_qp()
> spin_lock_irq(&qp->r_lock); --> Line 907 (Lock B)
> spin_lock(&qp->s_lock); --> Line 909 (Lock A)
>
> rvt_reset_qp()
> spin_lock_irq(&qp->r_lock); --> Line 936 (Lock B)
> spin_lock(&qp->s_lock); --> Line 938 (Lock A)
>
> When rvt_ruc_loopback() is concurrently executed with rvt_qp_mr_clean(),
> rvt_rc_timeout(), rvt_modify_qp(), _rvt_reset_qp() or rvt_reset_qp(),
> the deadlocks can occur.
>
> I am not quite sure whether these possible deadlocks are real and how to
> fix them if real.
> Any feedback would be appreciated, thanks :)
>
> Reported-by: TOTE Robot <oslab@...nghua.edu.cn>
Thanks, we'll look into them.
-Denny
Powered by blists - more mailing lists