From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Iremonger, Bernard" Subject: Re: [PATCH v7 26/27] net/i40e: fix segmentation fault in close 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> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Cc: "stable@dpdk.org" To: "Wu, Jingjing" , "Lu, Wenzhuo" , "dev@dpdk.org" Return-path: In-Reply-To: <9BB6961774997848B5B42BEC655768F810CC3E79@SHSMSX103.ccr.corp.intel.com> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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.