From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 56E4D1B05; Wed, 31 Oct 2018 18:28:24 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A38A730821A7; Wed, 31 Oct 2018 17:28:23 +0000 (UTC) Received: from [10.36.112.50] (ovpn-112-50.ams2.redhat.com [10.36.112.50]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 06E935D6A6; Wed, 31 Oct 2018 17:28:21 +0000 (UTC) To: Ferruh Yigit , Tiwei Bie , Zhihong Wang Cc: dev@dpdk.org, stable@dpdk.org References: <20181028010846.81730-1-ferruh.yigit@intel.com> <20181028010846.81730-3-ferruh.yigit@intel.com> From: Maxime Coquelin Message-ID: Date: Wed, 31 Oct 2018 18:28:19 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <20181028010846.81730-3-ferruh.yigit@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Wed, 31 Oct 2018 17:28:23 +0000 (UTC) Subject: Re: [dpdk-stable] [PATCH 3/3] vhost: fix possible out of bound access 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: , X-List-Received-Date: Wed, 31 Oct 2018 17:28:24 -0000 On 10/28/18 2:08 AM, Ferruh Yigit wrote: > Fixes: d7280c9fffcb ("vhost: support selective datapath") > Cc: stable@dpdk.org > > Signed-off-by: Ferruh Yigit > --- > lib/librte_vhost/vdpa.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/lib/librte_vhost/vdpa.c b/lib/librte_vhost/vdpa.c > index c2c5dff1d..e7d849ee0 100644 > --- a/lib/librte_vhost/vdpa.c > +++ b/lib/librte_vhost/vdpa.c > @@ -63,6 +63,9 @@ rte_vdpa_register_device(struct rte_vdpa_dev_addr *addr, > break; > } > > + if (i == MAX_VHOST_DEVICE) > + return -1; > + > sprintf(device_name, "vdpa-dev-%d", i); > dev = rte_zmalloc(device_name, sizeof(struct rte_vdpa_device), > RTE_CACHE_LINE_SIZE); > Reviewed-by: Maxime Coquelin Thanks, Maxime