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:   Sun, 25 Jul 2021 09:15:36 +0300
From:   Tariq Toukan <ttoukan.linux@...il.com>
To:     Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>, tariqt@...dia.com
Cc:     davem@...emloft.net, kuba@...nel.org, netdev@...r.kernel.org,
        linux-rdma@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mlx4: Fix missing error code in mlx4_load_one()



On 7/23/2021 1:36 PM, Jiapeng Chong wrote:
> The error code is missing in this code scenario, add the error code
> '-EINVAL' to the return value 'err'.
> 
> Eliminate the follow smatch warning:
> 
> drivers/net/ethernet/mellanox/mlx4/main.c:3538 mlx4_load_one() warn:
> missing error code 'err'.
> 
> Reported-by: Abaci Robot <abaci@...ux.alibaba.com>
> Fixes: 7ae0e400cd93 ("net/mlx4_core: Flexible (asymmetric) allocation of
> EQs and MSI-X vectors for PF/VFs")
> Signed-off-by: Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
> ---
>   drivers/net/ethernet/mellanox/mlx4/main.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/net/ethernet/mellanox/mlx4/main.c b/drivers/net/ethernet/mellanox/mlx4/main.c
> index 00c8465..28ac469 100644
> --- a/drivers/net/ethernet/mellanox/mlx4/main.c
> +++ b/drivers/net/ethernet/mellanox/mlx4/main.c
> @@ -3535,6 +3535,7 @@ static int mlx4_load_one(struct pci_dev *pdev, int pci_dev_data,
>   
>   		if (!SRIOV_VALID_STATE(dev->flags)) {
>   			mlx4_err(dev, "Invalid SRIOV state\n");
> +			err = -EINVAL;
>   			goto err_close;
>   		}
>   	}
> 

Thanks for you patch.
Reviewed-by: Tariq Toukan <tariqt@...dia.com>

Regards,
Tariq

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ