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]
Message-ID: <Y+9uBAXtjvWBZVcG@lincoln>
Date:   Fri, 17 Feb 2023 13:07:32 +0100
From:   Larysa Zaremba <larysa.zaremba@...el.com>
To:     Yang Yingliang <yangyingliang@...wei.com>
CC:     <netdev@...r.kernel.org>, <intel-wired-lan@...ts.osuosl.org>,
        <jesse.brandeburg@...el.com>, <anthony.l.nguyen@...el.com>,
        <davem@...emloft.net>, <edumazet@...gle.com>, <kuba@...nel.org>,
        <pabeni@...hat.com>, <jacob.e.keller@...el.com>,
        <michal.swiatkowski@...ux.intel.com>, <liwei391@...wei.com>
Subject: Re: [PATCH net-next] ice: fix error return code in ice_vsi_cfg_def()

On Fri, Feb 17, 2023 at 05:36:25PM +0800, Yang Yingliang wrote:
> Set the error code when ice_vsi_alloc_stat_arrays()
> or ice_vsi_get_qs() fails in ice_vsi_cfg_def().
> 
> Fixes: 6624e780a577 ("ice: split ice_vsi_setup into smaller functions")

Reviewed-by: Larysa Zaremba <larysa.zaremba@...el.com>

> Signed-off-by: Yang Yingliang <yangyingliang@...wei.com>
> ---
>  drivers/net/ethernet/intel/ice/ice_lib.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/intel/ice/ice_lib.c b/drivers/net/ethernet/intel/ice/ice_lib.c
> index 37fe639712e6..766edff0d638 100644
> --- a/drivers/net/ethernet/intel/ice/ice_lib.c
> +++ b/drivers/net/ethernet/intel/ice/ice_lib.c
> @@ -2692,12 +2692,14 @@ ice_vsi_cfg_def(struct ice_vsi *vsi, struct ice_vsi_cfg_params *params)
>  		return ret;
>  
>  	/* allocate memory for Tx/Rx ring stat pointers */
> -	if (ice_vsi_alloc_stat_arrays(vsi))
> +	ret = ice_vsi_alloc_stat_arrays(vsi);
> +	if (ret)
>  		goto unroll_vsi_alloc;
>  
>  	ice_alloc_fd_res(vsi);
>  
> -	if (ice_vsi_get_qs(vsi)) {
> +	ret = ice_vsi_get_qs(vsi);
> +	if (ret) {
>  		dev_err(dev, "Failed to allocate queues. vsi->idx = %d\n",
>  			vsi->idx);
>  		goto unroll_vsi_alloc_stat;
> -- 
> 2.25.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ