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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <DM4PR11MB611716995F764188DAC94A148255A@DM4PR11MB6117.namprd11.prod.outlook.com>
Date: Tue, 13 Jun 2023 07:54:04 +0000
From: "Fijalkowski, Maciej" <maciej.fijalkowski@...el.com>
To: "Nguyen, Anthony L" <anthony.l.nguyen@...el.com>, "davem@...emloft.net"
	<davem@...emloft.net>, "kuba@...nel.org" <kuba@...nel.org>,
	"pabeni@...hat.com" <pabeni@...hat.com>, "edumazet@...gle.com"
	<edumazet@...gle.com>, "netdev@...r.kernel.org" <netdev@...r.kernel.org>
CC: "Loktionov, Aleksandr" <aleksandr.loktionov@...el.com>
Subject: RE: [PATCH net v3 3/3] igb: fix nvm.ops.read() error handling

> From: Aleksandr Loktionov <aleksandr.loktionov@...el.com>
> 
> Add error handling into igb_set_eeprom() function, in case
> nvm.ops.read() fails just quit with error code asap.
> 
> Fixes: 9d5c824399de ("igb: PCI-Express 82575 Gigabit Ethernet driver")
> Signed-off-by: Aleksandr Loktionov <aleksandr.loktionov@...el.com>
> Signed-off-by: Tony Nguyen <anthony.l.nguyen@...el.com>

Reviewed-by: Maciej Fijalkowski <maciej.fijalkowski@...el.com>

> ---
>  drivers/net/ethernet/intel/igb/igb_ethtool.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/net/ethernet/intel/igb/igb_ethtool.c b/drivers/net/ethernet/intel/igb/igb_ethtool.c
> index 7d60da1b7bf4..319ed601eaa1 100644
> --- a/drivers/net/ethernet/intel/igb/igb_ethtool.c
> +++ b/drivers/net/ethernet/intel/igb/igb_ethtool.c
> @@ -822,6 +822,8 @@ static int igb_set_eeprom(struct net_device *netdev,
>  		 */
>  		ret_val = hw->nvm.ops.read(hw, last_word, 1,
>  				   &eeprom_buff[last_word - first_word]);
> +		if (ret_val)
> +			goto out;
>  	}
> 
>  	/* Device's eeprom is always little-endian, word addressable */
> @@ -841,6 +843,7 @@ static int igb_set_eeprom(struct net_device *netdev,
>  		hw->nvm.ops.update(hw);
> 
>  	igb_set_fw_version(adapter);
> +out:
>  	kfree(eeprom_buff);
>  	return ret_val;
>  }
> --
> 2.38.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ