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: Fri, 14 Jun 2024 09:33:49 +0200
From: Larysa Zaremba <larysa.zaremba@...el.com>
To: Paul Menzel <pmenzel@...gen.mpg.de>
CC: Karen Ostrowska <karen.ostrowska@...el.com>, Eric Joyner
	<eric.joyner@...el.com>, <intel-wired-lan@...ts.osuosl.org>,
	<netdev@...r.kernel.org>, Przemek Kitszel <przemyslaw.kitszel@...el.com>,
	Michal Swiatkowski <michal.swiatkowski@...ux.intel.com>
Subject: Re: [Intel-wired-lan] [iwl-next v1] ice: Check all ice_vsi_rebuild()
 errors in function

On Tue, Jun 11, 2024 at 11:01:55AM +0200, Paul Menzel wrote:
> Dear Eric, dear Karen,
> 
> 
> Thank you for the patch.
> 
> 
> Am 28.05.24 um 11:01 schrieb Karen Ostrowska:
> > From: Eric Joyner <eric.joyner@...el.com>
> > 
> > Check the return value from ice_vsi_rebuild() and prevent the usage of
> > incorrectly configured VSI.
> 
> Was this found during code review, or is this seen in practice? If the
> latter, please document the test system and test case.
> 
> > Reviewed-by: Michal Swiatkowski <michal.swiatkowski@...ux.intel.com>
> > Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@...el.com>
> > Signed-off-by: Eric Joyner <eric.joyner@...el.com>
> > Signed-off-by: Karen Ostrowska <karen.ostrowska@...el.com>
> 
> Should there be a Fixes: tag?
>

There MUST be a goto here. Patch results in an error message without an error 
[43788.733637] ice 0000:18:00.0: Error during VSI rebuild: 0. Unload and reload the driver.

> 
> Kind regards,
> 
> Paul
> 
> 
> > ---
> >   drivers/net/ethernet/intel/ice/ice_main.c | 12 ++++++++++--
> >   1 file changed, 10 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
> > index f60c022f7960..e8c30b1730a6 100644
> > --- a/drivers/net/ethernet/intel/ice/ice_main.c
> > +++ b/drivers/net/ethernet/intel/ice/ice_main.c
> > @@ -4135,15 +4135,23 @@ int ice_vsi_recfg_qs(struct ice_vsi *vsi, int new_rx, int new_tx, bool locked)
> >   	/* set for the next time the netdev is started */
> >   	if (!netif_running(vsi->netdev)) {
> > -		ice_vsi_rebuild(vsi, ICE_VSI_FLAG_NO_INIT);
> > +		err = ice_vsi_rebuild(vsi, ICE_VSI_FLAG_NO_INIT);
> > +		if (err)
> > +			goto rebuild_err;
> >   		dev_dbg(ice_pf_to_dev(pf), "Link is down, queue count change happens when link is brought up\n");
> >   		goto done;
> >   	}
> >   	ice_vsi_close(vsi);
> > -	ice_vsi_rebuild(vsi, ICE_VSI_FLAG_NO_INIT);
> > +	err = ice_vsi_rebuild(vsi, ICE_VSI_FLAG_NO_INIT);
> > +	if (err)
> > +		goto rebuild_err;
> > +
> >   	ice_pf_dcb_recfg(pf, locked);
> >   	ice_vsi_open(vsi);
> > +
> > +rebuild_err:
> > +	dev_err(ice_pf_to_dev(pf), "Error during VSI rebuild: %d. Unload and reload the driver.\n", err);
> >   done:
> >   	clear_bit(ICE_CFG_BUSY, pf->state);
> >   	return err;
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ