From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 49C2458CB for ; Fri, 30 Jan 2015 08:57:37 +0100 (CET) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga102.fm.intel.com with ESMTP; 29 Jan 2015 23:57:26 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,491,1418112000"; d="scan'208";a="678453571" Received: from kmsmsx152.gar.corp.intel.com ([172.21.73.87]) by orsmga002.jf.intel.com with ESMTP; 29 Jan 2015 23:57:27 -0800 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by KMSMSX152.gar.corp.intel.com (172.21.73.87) with Microsoft SMTP Server (TLS) id 14.3.195.1; Fri, 30 Jan 2015 15:57:18 +0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.124]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.168]) with mapi id 14.03.0195.001; Fri, 30 Jan 2015 15:57:18 +0800 From: "Ouyang, Changchun" To: "Xie, Huawei" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] examples/vhost: fix segfault when link_vmdq fails Thread-Index: AQHQPFxb/N3a3If2K0+Zi4orBTip1ZzYS39A Date: Fri, 30 Jan 2015 07:57:17 +0000 Message-ID: References: <1422602016-12662-1-git-send-email-huawei.xie@intel.com> In-Reply-To: <1422602016-12662-1-git-send-email-huawei.xie@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] examples/vhost: fix segfault when link_vmdq fails X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jan 2015 07:57:37 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Huawei Xie > Sent: Friday, January 30, 2015 3:14 PM > To: dev@dpdk.org > Subject: [dpdk-dev] [PATCH] examples/vhost: fix segfault when link_vmdq > fails >=20 > Signed-off-by: Huawei Xie Acked-by: Changchun Ouyang > --- > examples/vhost/main.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) >=20 > diff --git a/examples/vhost/main.c b/examples/vhost/main.c index > 04f0118..3a35359 100644 > --- a/examples/vhost/main.c > +++ b/examples/vhost/main.c > @@ -1308,8 +1308,8 @@ switch_worker(__attribute__((unused)) void *arg) > /* If this is the first received packet we need > to learn the MAC and setup VMDQ */ > if (unlikely(vdev->ready =3D=3D > DEVICE_MAC_LEARNING) && tx_count) { > if (vdev->remove || > (link_vmdq(vdev, pkts_burst[0]) =3D=3D -1)) { > - while (tx_count--) > - > rte_pktmbuf_free(pkts_burst[tx_count]); > + while (tx_count) > + > rte_pktmbuf_free(pkts_burst[--tx_count]); > } > } > while (tx_count) > -- > 1.8.1.4