From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from dpdk.org (dpdk.org [92.243.14.124])
	by dpdk.space (Postfix) with ESMTP id 0CF37A00E6
	for <public@inbox.dpdk.org>; Wed, 17 Apr 2019 09:16:59 +0200 (CEST)
Received: from [92.243.14.124] (localhost [127.0.0.1])
	by dpdk.org (Postfix) with ESMTP id 737531B10C;
	Wed, 17 Apr 2019 09:16:58 +0200 (CEST)
Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28])
 by dpdk.org (Postfix) with ESMTP id 812325F25
 for <dev@dpdk.org>; Wed, 17 Apr 2019 09:16:57 +0200 (CEST)
Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com
 [10.5.11.22])
 (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
 (No client certificate requested)
 by mx1.redhat.com (Postfix) with ESMTPS id E2CCB88309;
 Wed, 17 Apr 2019 07:16:56 +0000 (UTC)
Received: from [10.36.112.28] (ovpn-112-28.ams2.redhat.com [10.36.112.28])
 by smtp.corp.redhat.com (Postfix) with ESMTPS id 29DC81001E89;
 Wed, 17 Apr 2019 07:16:55 +0000 (UTC)
To: Stephen Hemminger <stephen@networkplumber.org>, dev@dpdk.org
References: <20190405000343.24424-1-stephen@networkplumber.org>
 <20190405163115.5068-1-stephen@networkplumber.org>
From: Maxime Coquelin <maxime.coquelin@redhat.com>
Message-ID: <3bd7dbf6-aceb-9eee-6834-98ac16a62739@redhat.com>
Date: Wed, 17 Apr 2019 09:16:54 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101
 Thunderbird/60.5.1
MIME-Version: 1.0
In-Reply-To: <20190405163115.5068-1-stephen@networkplumber.org>
Content-Type: text/plain; charset="UTF-8"; format="flowed"
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16
 (mx1.redhat.com [10.5.110.28]); Wed, 17 Apr 2019 07:16:56 +0000 (UTC)
Subject: Re: [dpdk-dev] [PATCH v2] virtio: fix buffer leak on vlan insert
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>
Message-ID: <20190417071654.G_0bPgfzlwx9O2U6FXKmJHHV_8KeMn8GZV3pvmFTcDI@z>



On 4/5/19 6:31 PM, Stephen Hemminger wrote:
> The function rte_vlan_insert may allocate a new buffer for the
> vlan header and return a different mbuf than originally passed.
> In this case, the stored mbuf in txm[] array could point to wrong
> buffer.
> 
> Fixes: dd856dfcb9e7 ("virtio: use any layout on Tx")
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> ---
> v2 - catch a couple more places.
>       The virtio code needs some refactoring to not have 3 copies of same
>       loop...
> 
>   drivers/net/virtio/virtio_rxtx.c | 6 ++++++
>   1 file changed, 6 insertions(+)
> 

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

Thanks,
Maxime