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] [day] [month] [year] [list]
Message-ID: <1522341089.15392.172.camel@intel.com>
Date:   Thu, 29 Mar 2018 16:31:31 +0000
From:   "Venkataramanan, Anirudh" <anirudh.venkataramanan@...el.com>
To:     "Kirsher, Jeffrey T" <jeffrey.t.kirsher@...el.com>,
        "weiyongjun1@...wei.com" <weiyongjun1@...wei.com>
CC:     "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "intel-wired-lan@...ts.osuosl.org" <intel-wired-lan@...ts.osuosl.org>,
        "kernel-janitors@...r.kernel.org" <kernel-janitors@...r.kernel.org>
Subject: Re: [Intel-wired-lan] [PATCH net-next] ice: Fix error return code
 in ice_init_hw()

On Wed, 2018-03-28 at 12:50 +0000, Wei Yongjun wrote:
> Fix to return error code ICE_ERR_NO_MEMORY from the alloc error
> handling case instead of 0, as done elsewhere in this function.
> 
> Fixes: dc49c7723676 ("ice: Get MAC/PHY/link info and scheduler
> topology")
> Signed-off-by: Wei Yongjun <weiyongjun1@...wei.com>
> ---
>  drivers/net/ethernet/intel/ice/ice_common.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/intel/ice/ice_common.c
> b/drivers/net/ethernet/intel/ice/ice_common.c
> index 385f5d4..21977ec 100644
> --- a/drivers/net/ethernet/intel/ice/ice_common.c
> +++ b/drivers/net/ethernet/intel/ice/ice_common.c
> @@ -468,8 +468,10 @@ enum ice_status ice_init_hw(struct ice_hw *hw)
>  	mac_buf_len = sizeof(struct ice_aqc_manage_mac_read_resp);
>  	mac_buf = devm_kzalloc(ice_hw_to_dev(hw), mac_buf_len,
> GFP_KERNEL);
>  
> -	if (!mac_buf)
> +	if (!mac_buf) {
> +		status = ICE_ERR_NO_MEMORY;
>  		goto err_unroll_fltr_mgmt_struct;
> +	}
>  
>  	status = ice_aq_manage_mac_read(hw, mac_buf, mac_buf_len,
> NULL);
>  	devm_kfree(ice_hw_to_dev(hw), mac_buf);
> 

Acked-by: Anirudh Venkataramanan <anirudh.venkataramanan@...el.com>

Thanks!
Ani
Download attachment "smime.p7s" of type "application/x-pkcs7-signature" (3302 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ