patches for DPDK stable branches
 help / color / mirror / Atom feed
From: "Jiang, YuX" <yux.jiang@intel.com>
To: Maxime Coquelin <maxime.coquelin@redhat.com>,
	"dev@dpdk.org" <dev@dpdk.org>,
	"Xia, Chenbo" <chenbo.xia@intel.com>,
	"amorenoz@redhat.com" <amorenoz@redhat.com>
Cc: "stable@dpdk.org" <stable@dpdk.org>,
	"Wang, Yinan" <yinan.wang@intel.com>,
	 "Jiang, YuX" <yux.jiang@intel.com>
Subject: Re: [dpdk-stable] [PATCH] vhost: fix virtqueue initialization
Date: Mon, 9 Nov 2020 05:09:49 +0000
Message-ID: <3d29ed679e83421c9c3d637664f84184@intel.com> (raw)
In-Reply-To: <20201106144744.176463-1-maxime.coquelin@redhat.com>

Tested-by: JiangYuX <yux.jiang@intel.com>

    Best Regards
    Jiang yu

> -----Original Message-----
> From: Maxime Coquelin [mailto:maxime.coquelin@redhat.com]
> Sent: Friday, November 6, 2020 10:48 PM
> To: dev@dpdk.org; Xia, Chenbo <chenbo.xia@intel.com>;
> amorenoz@redhat.com
> Cc: stable@dpdk.org; Maxime Coquelin <maxime.coquelin@redhat.com>;
> Jiang, YuX <yux.jiang@intel.com>
> Subject: [PATCH] vhost: fix virtqueue initialization
> 
> This patches fixes virtqueue initialization issue causing segfault or file
> descriptor being closed unexpectedly.
> 
> The wrong index was passed to init_vring_queue() by
> alloc_vring_queue() when a hole in the virtqueue array was met.
> 
> Fixes: 8acd7c213353 ("vhost: fix virtqueues metadata allocation")
> Cc: stable@dpdk.org
> 
> Reported-by: Yu Jiang <yux.jiang@intel.com>
> Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
> ---
>  lib/librte_vhost/vhost.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/librte_vhost/vhost.c b/lib/librte_vhost/vhost.c index
> 8a151a9c1d..b83cf639eb 100644
> --- a/lib/librte_vhost/vhost.c
> +++ b/lib/librte_vhost/vhost.c
> @@ -605,7 +605,7 @@ alloc_vring_queue(struct virtio_net *dev, uint32_t
> vring_idx)
>  		}
> 
>  		dev->virtqueue[i] = vq;
> -		init_vring_queue(dev, vring_idx);
> +		init_vring_queue(dev, i);
>  		rte_spinlock_init(&vq->access_lock);
>  		vq->avail_wrap_counter = 1;
>  		vq->used_wrap_counter = 1;
> --
> 2.26.2


  parent reply	other threads:[~2020-11-09  5:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-06 14:47 Maxime Coquelin
2020-11-06 15:56 ` [dpdk-stable] [dpdk-dev] " David Marchand
2020-11-09  5:09 ` Jiang, YuX [this message]
2020-11-09 18:38   ` Ferruh Yigit
2020-11-09 16:31 ` [dpdk-stable] " Maxime Coquelin
2020-11-09 18:37 ` [dpdk-stable] [dpdk-dev] " Ferruh Yigit
2020-11-09 18:39   ` Maxime Coquelin
2020-11-09 18:40   ` Ferruh Yigit

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=3d29ed679e83421c9c3d637664f84184@intel.com \
    --to=yux.jiang@intel.com \
    --cc=amorenoz@redhat.com \
    --cc=chenbo.xia@intel.com \
    --cc=dev@dpdk.org \
    --cc=maxime.coquelin@redhat.com \
    --cc=stable@dpdk.org \
    --cc=yinan.wang@intel.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

patches for DPDK stable branches

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ https://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git