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 4D5C41B490 for ; Wed, 17 Apr 2019 09:56:53 +0200 (CEST) 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 B553C307D910; Wed, 17 Apr 2019 07:56:52 +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 0BAAB5D707; Wed, 17 Apr 2019 07:56:51 +0000 (UTC) To: Stephen Hemminger , dev@dpdk.org References: <20190405000343.24424-1-stephen@networkplumber.org> <20190405163115.5068-1-stephen@networkplumber.org> From: Maxime Coquelin Message-ID: <7550b248-534a-8ffb-5aa3-37d576df59ac@redhat.com> Date: Wed, 17 Apr 2019 09:56:47 +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.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.48]); Wed, 17 Apr 2019 07:56:52 +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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Apr 2019 07:56:53 -0000 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 > --- > 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(+) > Applied to dpdk-next-virtio/master. Note that I fixed the commit title so that it passes check-git-log script. Thanks, Maxime From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id D1A6CA00E6 for ; Wed, 17 Apr 2019 09:56:55 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 91A161B4F5; Wed, 17 Apr 2019 09:56:55 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 4D5C41B490 for ; Wed, 17 Apr 2019 09:56:53 +0200 (CEST) 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 B553C307D910; Wed, 17 Apr 2019 07:56:52 +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 0BAAB5D707; Wed, 17 Apr 2019 07:56:51 +0000 (UTC) To: Stephen Hemminger , dev@dpdk.org References: <20190405000343.24424-1-stephen@networkplumber.org> <20190405163115.5068-1-stephen@networkplumber.org> From: Maxime Coquelin Message-ID: <7550b248-534a-8ffb-5aa3-37d576df59ac@redhat.com> Date: Wed, 17 Apr 2019 09:56:47 +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.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.48]); Wed, 17 Apr 2019 07:56:52 +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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Message-ID: <20190417075647.p8ASbSkLwt5QQMS3Pu1uVY2wJlB6y_q0K7AuD5f6Ogk@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 > --- > 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(+) > Applied to dpdk-next-virtio/master. Note that I fixed the commit title so that it passes check-git-log script. Thanks, Maxime