From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id EAE1E20F; Fri, 6 Jan 2017 13:00:12 +0100 (CET) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga105.fm.intel.com with ESMTP; 06 Jan 2017 04:00:10 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,324,1477983600"; d="scan'208";a="50204370" Received: from irsmsx105.ger.corp.intel.com ([163.33.3.28]) by fmsmga005.fm.intel.com with ESMTP; 06 Jan 2017 04:00:07 -0800 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.173]) by irsmsx105.ger.corp.intel.com ([169.254.7.38]) with mapi id 14.03.0248.002; Fri, 6 Jan 2017 12:00:06 +0000 From: "Iremonger, Bernard" To: "Wu, Jingjing" , "Lu, Wenzhuo" , "dev@dpdk.org" CC: "stable@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v7 26/27] net/i40e: fix segmentation fault in close Thread-Index: AQHSZ7xKP1B1V8GtA0S37ua1ZcezVqErVdbA Date: Fri, 6 Jan 2017 12:00:05 +0000 Message-ID: <8CEF83825BEC744B83065625E567D7C224D1B4CF@IRSMSX108.ger.corp.intel.com> References: <1480637533-37425-1-git-send-email-wenzhuo.lu@intel.com> <1483426488-117332-1-git-send-email-wenzhuo.lu@intel.com> <1483426488-117332-27-git-send-email-wenzhuo.lu@intel.com> <9BB6961774997848B5B42BEC655768F810CC3E79@SHSMSX103.ccr.corp.intel.com> In-Reply-To: <9BB6961774997848B5B42BEC655768F810CC3E79@SHSMSX103.ccr.corp.intel.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYWEwMTQ0NjYtNTMxZC00M2Y5LWJlYzYtZWFjMzA0NmVjNzRkIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjIuMTEuMCIsIlRydXN0ZWRMYWJlbEhhc2giOiI1WmsxVlRTM2hFcW9SYVA1UTRtUEZVaHIrcHo3Tm1ma2dmbG9PdFJDZFwvZz0ifQ== x-ctpclassification: CTP_IC x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v7 26/27] net/i40e: fix segmentation fault in close 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: Fri, 06 Jan 2017 12:00:13 -0000 Hi Jingjing, > -----Original Message----- > From: Wu, Jingjing > Sent: Friday, January 6, 2017 1:29 AM > To: Lu, Wenzhuo ; dev@dpdk.org > Cc: Iremonger, Bernard ; stable@dpdk.org > Subject: RE: [dpdk-dev] [PATCH v7 26/27] net/i40e: fix segmentation fault= in > close >=20 >=20 >=20 > > -----Original Message----- > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Wenzhuo Lu > > Sent: Tuesday, January 3, 2017 2:55 PM > > To: dev@dpdk.org > > Cc: Iremonger, Bernard ; > stable@dpdk.org > > Subject: [dpdk-dev] [PATCH v7 26/27] net/i40e: fix segmentation fault > > in close > > > > From: Bernard Iremonger > > > > The vsi's have already been released, so the second call to > > i40e_vsi_release results in a segmentation fault. > > The second call to i40e_vsi_release has been removed. > Where is the first call to release vmdq vsi? All of the VSI's are released in the call to i40e_vsi_release(pf->main_vsi)= at line 1895. This function is recursive and release all the VSI's. There is still a VSI address in pf->vmdq[i].vsi but calling=20 i40e_vsi_release(pf->vmdq[i].vsi); Results in a segmentation fault. >=20 > Thanks > Jingjing > > > > Fixes: 3cb446b4aeb2 ("i40e: free vmdq vsi when closing") > > > > CC: stable@dpdk.org > > > > Signed-off-by: Bernard Iremonger > > --- > > drivers/net/i40e/i40e_ethdev.c | 4 +++- > > 1 file changed, 3 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/net/i40e/i40e_ethdev.c > > b/drivers/net/i40e/i40e_ethdev.c index be45cfa..0b7c366 100644 > > --- a/drivers/net/i40e/i40e_ethdev.c > > +++ b/drivers/net/i40e/i40e_ethdev.c > > @@ -1882,7 +1882,6 @@ static inline void i40e_GLQF_reg_init(struct > > i40e_hw > > *hw) > > i40e_vsi_release(pf->main_vsi); > > > > for (i =3D 0; i < pf->nb_cfg_vmdq_vsi; i++) { > > - i40e_vsi_release(pf->vmdq[i].vsi); > > pf->vmdq[i].vsi =3D NULL; > > } > > > > @@ -4137,6 +4136,9 @@ enum i40e_status_code > > if (!vsi) > > return I40E_SUCCESS; > > > > + if (!vsi->adapter) > > + return I40E_ERR_BAD_PTR; > > + > > user_param =3D vsi->user_param; > > > > pf =3D I40E_VSI_TO_PF(vsi); > > -- > > 1.9.3 Regards, Bernard.