lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 10 Apr 2023 08:49:40 +0000
From:   Sai Krishna Gajula <saikrishnag@...vell.com>
To:     Simon Horman <simon.horman@...igine.com>
CC:     "davem@...emloft.net" <davem@...emloft.net>,
        "edumazet@...gle.com" <edumazet@...gle.com>,
        "kuba@...nel.org" <kuba@...nel.org>,
        "pabeni@...hat.com" <pabeni@...hat.com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Sunil Kovvuri Goutham <sgoutham@...vell.com>,
        Geethasowjanya Akula <gakula@...vell.com>,
        "richardcochran@...il.com" <richardcochran@...il.com>,
        Linu Cherian <lcherian@...vell.com>,
        Jerin Jacob Kollanukkaran <jerinj@...vell.com>,
        Hariprasad Kelam <hkelam@...vell.com>,
        Subbaraya Sundeep Bhatta <sbhatta@...vell.com>
Subject: Re: [net PATCH v2 7/7] octeontx2-pf: Disable packet I/O for graceful
 exit

Please see inline,

> -----Original Message-----
> From: Simon Horman <simon.horman@...igine.com>
> Sent: Saturday, April 8, 2023 8:00 PM
> To: Sai Krishna Gajula <saikrishnag@...vell.com>
> Cc: davem@...emloft.net; edumazet@...gle.com; kuba@...nel.org;
> pabeni@...hat.com; netdev@...r.kernel.org; linux-
> kernel@...r.kernel.org; Sunil Kovvuri Goutham <sgoutham@...vell.com>;
> Geethasowjanya Akula <gakula@...vell.com>; richardcochran@...il.com;
> Linu Cherian <lcherian@...vell.com>; Jerin Jacob Kollanukkaran
> <jerinj@...vell.com>; Hariprasad Kelam <hkelam@...vell.com>;
> Subbaraya Sundeep Bhatta <sbhatta@...vell.com>
> Subject: Re: [net PATCH v2 7/7] octeontx2-pf: Disable packet I/O for
> graceful exit
> 
> On Fri, Apr 07, 2023 at 05:53:44PM +0530, Sai Krishna wrote:
> > From: Subbaraya Sundeep <sbhatta@...vell.com>
> >
> > At the stage of enabling packet I/O in otx2_open, If mailbox timeout
> > occurs then interface ends up in down state where as hardware packet
> > I/O is enabled. Hence disable packet I/O also before bailing out. This
> > patch also free the LMTST per cpu structure on teardown, if the
> > lmt_info pointer is not NULL.
> >
> > Fixes: 1ea0166da050 ("octeontx2-pf: Fix the device state on error")
> > Signed-off-by: Subbaraya Sundeep <sbhatta@...vell.com>
> > Signed-off-by: Sunil Kovvuri Goutham <sgoutham@...vell.com>
> > Signed-off-by: Sai Krishna <saikrishnag@...vell.com>
> 
> ...
> 
> > @@ -709,7 +709,8 @@ static int otx2vf_probe(struct pci_dev *pdev,
> > const struct pci_device_id *id)
> >  err_ptp_destroy:
> >  	otx2_ptp_destroy(vf);
> >  err_detach_rsrc:
> > -	free_percpu(vf->hw.lmt_info);
> > +	if (vf->hw.lmt_info)
> > +		free_percpu(vf->hw.lmt_info);
> 
> free_percpu does nothing if it's argument is NULL.
> So there is no need for the if clause added here.

We will submit v3 patch as per review comments.

> 
> >  	if (test_bit(CN10K_LMTST, &vf->hw.cap_flag))
> >  		qmem_free(vf->dev, vf->dync_lmt);
> >  	otx2_detach_resources(&vf->mbox);
> > @@ -763,7 +764,8 @@ static void otx2vf_remove(struct pci_dev *pdev)
> >  	otx2_shutdown_tc(vf);
> >  	otx2vf_disable_mbox_intr(vf);
> >  	otx2_detach_resources(&vf->mbox);
> > -	free_percpu(vf->hw.lmt_info);
> > +	if (vf->hw.lmt_info)
> > +		free_percpu(vf->hw.lmt_info);
> 
> Ditto.

We will submit v3 patch as per review comments.

Thanks,
Sai
> 
> >  	if (test_bit(CN10K_LMTST, &vf->hw.cap_flag))
> >  		qmem_free(vf->dev, vf->dync_lmt);
> >  	otx2vf_vfaf_mbox_destroy(vf);
> > --
> > 2.25.1
> >

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ