patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Maxime Coquelin <maxime.coquelin@redhat.com>
To: Stephen Hemminger <stephen@networkplumber.org>, dev@dpdk.org
Cc: david.marchand@redhat.com, stable@dpdk.org,
	Chenbo Xia <chenbox@nvidia.com>,
	Eelco Chaudron <echaudro@redhat.com>
Subject: Re: [PATCH] vhost: fix read vs write lock mismatch
Date: Tue, 26 Nov 2024 09:14:44 +0100	[thread overview]
Message-ID: <c5ed7d47-62be-40d8-abe0-c9ed3e534f7f@redhat.com> (raw)
In-Reply-To: <20241118162424.9038-1-stephen@networkplumber.org>



On 11/18/24 17:24, Stephen Hemminger wrote:
> If lock is acquired for write, it must be released for write
> or a deadlock is likely.
> 
> Bugzilla ID: 1582
> Fixes: 9fc93a1e2320 ("vhost: fix virtqueue access check in datapath")
> Cc: david.marchand@redhat.com
> Cc: stable@dpdk.org
> 
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> ---
>   lib/vhost/virtio_net.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/vhost/virtio_net.c b/lib/vhost/virtio_net.c
> index 298a5dae74..d764d4bc6a 100644
> --- a/lib/vhost/virtio_net.c
> +++ b/lib/vhost/virtio_net.c
> @@ -2538,7 +2538,7 @@ virtio_dev_rx_async_submit(struct virtio_net *dev, struct vhost_virtqueue *vq,
>   
>   	if (unlikely(!vq->access_ok)) {
>   		vhost_user_iotlb_rd_unlock(vq);
> -		rte_rwlock_read_unlock(&vq->access_lock);
> +		rte_rwlock_write_unlock(&vq->access_lock);
>   
>   		virtio_dev_vring_translate(dev, vq);
>   		goto out_no_unlock;

Applied to dpdk-next-virtio/for-main with suggested title change.

Thanks,
Maxime


      parent reply	other threads:[~2024-11-26  8:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-18 16:24 Stephen Hemminger
2024-11-25 11:14 ` David Marchand
2024-11-25 16:20   ` Maxime Coquelin
2024-11-25 16:28     ` David Marchand
2024-11-25 16:31       ` Maxime Coquelin
2024-11-25 16:44         ` Stephen Hemminger
2024-11-26  8:14 ` Maxime Coquelin [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=c5ed7d47-62be-40d8-abe0-c9ed3e534f7f@redhat.com \
    --to=maxime.coquelin@redhat.com \
    --cc=chenbox@nvidia.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=echaudro@redhat.com \
    --cc=stable@dpdk.org \
    --cc=stephen@networkplumber.org \
    /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).