From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 813CDA0527 for ; Mon, 9 Nov 2020 19:40:28 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 79DD2697B; Mon, 9 Nov 2020 19:40:27 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 96CB3697B; Mon, 9 Nov 2020 19:40:24 +0100 (CET) IronPort-SDR: cjnbKpRn3Xyy46wji3y3+xcYVKf5F0j/x8h2EPFMp6qRPRWJMJkUW0N1bRvISjVBww7FVzYWox 84P0lNO7M+6Q== X-IronPort-AV: E=McAfee;i="6000,8403,9800"; a="170003257" X-IronPort-AV: E=Sophos;i="5.77,464,1596524400"; d="scan'208";a="170003257" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Nov 2020 10:40:22 -0800 IronPort-SDR: d/VX0X0YJNw2iP24vHaOYt3zguetvKWiK1XIaj6N9rpJALBz52Bb0iUPWJIflUTVd/PGezJWT3 0xMfAa3I3PMw== X-IronPort-AV: E=Sophos;i="5.77,464,1596524400"; d="scan'208";a="530867706" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.213.193.177]) ([10.213.193.177]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Nov 2020 10:40:20 -0800 From: Ferruh Yigit To: Maxime Coquelin , dev@dpdk.org, chenbo.xia@intel.com, amorenoz@redhat.com Cc: stable@dpdk.org, Yu Jiang References: <20201106144744.176463-1-maxime.coquelin@redhat.com> Message-ID: <832043af-ee82-aa33-1e27-a95c1b6f45b5@intel.com> Date: Mon, 9 Nov 2020 18:40:19 +0000 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH] vhost: fix virtqueue initialization X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" On 11/9/2020 6:37 PM, Ferruh Yigit wrote: > On 11/6/2020 2:47 PM, Maxime Coquelin wrote: >> 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 >> > > Since the issue is introduced in this release, there is nothing to backport and > stable tag is not required, removing it in next-net. > But it is fixing a fix, there is a chain, so adding it back, sorry for noise ... >> Reported-by: Yu Jiang >> Signed-off-by: Maxime Coquelin >> --- >>   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; >> >