From: Jason Gunthorpe <jgg@nvidia.com>
To: Niels Dossche <dossche.niels@gmail.com>
Cc: linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org,
Dennis Dalessandro <dennis.dalessandro@cornelisnetworks.com>,
Mike Marciniszyn <mike.marciniszyn@cornelisnetworks.com>
Subject: Re: [PATCH] IB/rdmavt: add missing locks in rvt_ruc_loopback
Date: Fri, 8 Apr 2022 13:31:30 -0300 [thread overview]
Message-ID: <20220408163130.GA3612543@nvidia.com> (raw)
In-Reply-To: <20220228195144.71946-1-dossche.niels@gmail.com>
On Mon, Feb 28, 2022 at 08:51:44PM +0100, Niels Dossche wrote:
> The documentation of the function rvt_error_qp says both r_lock and
> s_lock need to be held when calling that function.
> It also asserts using lockdep that both of those locks are held.
> rvt_error_qp is called form rvt_send_cq, which is called from
> rvt_qp_complete_swqe, which is called from rvt_send_complete, which is
> called from rvt_ruc_loopback in two places. Both of these places do not
> hold r_lock. Fix this by acquiring a spin_lock of r_lock in both of
> these places.
> The r_lock acquiring cannot be added in rvt_qp_complete_swqe because
> some of its other callers already have r_lock acquired.
>
> Signed-off-by: Niels Dossche <dossche.niels@gmail.com>
> ---
> drivers/infiniband/sw/rdmavt/qp.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
Applied to for-next, thanks
Jason
prev parent reply other threads:[~2022-04-08 16:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-28 19:51 [PATCH] IB/rdmavt: add missing locks in rvt_ruc_loopback Niels Dossche
2022-04-08 16:31 ` Jason Gunthorpe [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220408163130.GA3612543@nvidia.com \
--to=jgg@nvidia.com \
--cc=dennis.dalessandro@cornelisnetworks.com \
--cc=dossche.niels@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=mike.marciniszyn@cornelisnetworks.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.