DPDK patches and discussions
 help / color / mirror / Atom feed
From: Maxime Coquelin <maxime.coquelin@redhat.com>
To: David Marchand <david.marchand@redhat.com>, dev@dpdk.org
Cc: Chenbo Xia <chenbox@nvidia.com>,
	Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Subject: Re: [PATCH] vhost/crypto: fix locking
Date: Wed, 5 Mar 2025 10:52:37 +0100	[thread overview]
Message-ID: <617065b3-c58f-4278-82c8-b43009a4cde0@redhat.com> (raw)
In-Reply-To: <20250305091217.590887-1-david.marchand@redhat.com>



On 3/5/25 10:12 AM, David Marchand wrote:
> vc_req_out->vq->iotlb_lock is taken twice on the same thread:
> vc_req_out->vq refers to vc_req->vq (after a memcpy), which itself
> is a reference to the vq.
> 
> clang probably does not detect that the same object is already locked as
> it does not track object referencies.

s/referencies/references/

> 
> Finish the incomplete and incorrect cleanup and only refer to the
> &vq->iotlb_lock capability (required by vhost_iova_to_vva).
> 
> Fixes: 88c73b5434e6 ("vhost/crypto: fix thread safety check")
> 
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---
>   lib/vhost/vhost_crypto.c | 95 +++++++++++++++++++---------------------
>   1 file changed, 46 insertions(+), 49 deletions(-)
> 


Thanks for fixing this!
With the typo fixed:

Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

Maxime


  reply	other threads:[~2025-03-05  9:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-05  9:12 David Marchand
2025-03-05  9:52 ` Maxime Coquelin [this message]
2025-03-05 11:00   ` Thomas Monjalon
2025-03-05  9:56 ` [EXTERNAL] " Gowrishankar Muthukrishnan

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=617065b3-c58f-4278-82c8-b43009a4cde0@redhat.com \
    --to=maxime.coquelin@redhat.com \
    --cc=chenbox@nvidia.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=gmuthukrishn@marvell.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;
as well as URLs for NNTP newsgroup(s).