public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@nvidia.com>
To: Niels Dossche <dossche.niels@gmail.com>,
	Dennis Dalessandro <dennis.dalessandro@cornelisnetworks.com>
Cc: linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org,
	Mike Marciniszyn <mike.marciniszyn@cornelisnetworks.com>
Subject: Re: [PATCH] IB/rdmavt: add lock to call to rvt_error_qp to prevent a race condition
Date: Mon, 4 Apr 2022 10:42:09 -0300	[thread overview]
Message-ID: <20220404134209.GA2905506@nvidia.com> (raw)
In-Reply-To: <20220228165330.41546-1-dossche.niels@gmail.com>

On Mon, Feb 28, 2022 at 05:53:30PM +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.
> However, the commit I referenced in Fixes accidentally makes the call
> to rvt_error_qp in rvt_ruc_loopback no longer covered by r_lock.
> This results in the lockdep assertion failing and also possibly in a
> race condition.
> 
> Fixes: d757c60eca9b ("IB/rdmavt: Fix concurrency panics in QP post_send and modify to error")
> Signed-off-by: Niels Dossche <dossche.niels@gmail.com>
> ---
>  drivers/infiniband/sw/rdmavt/qp.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)

Dennis?

And this too:

https://patchwork.kernel.org/project/linux-rdma/patch/20220228195144.71946-1-dossche.niels@gmail.com/

Thanks,
Jason

  reply	other threads:[~2022-04-04 13:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-28 16:53 [PATCH] IB/rdmavt: add lock to call to rvt_error_qp to prevent a race condition Niels Dossche
2022-04-04 13:42 ` Jason Gunthorpe [this message]
2022-04-04 17:14   ` Dennis Dalessandro
2022-04-08 16:30 ` Jason Gunthorpe

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=20220404134209.GA2905506@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox