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: <20230814101113.GE3921@unreal>
Date: Mon, 14 Aug 2023 13:11:13 +0300
From: Leon Romanovsky <leon@...nel.org>
To: Li Zetao <lizetao1@...wei.com>
Cc: vadim.fedorenko@...ux.dev, davem@...emloft.net, edumazet@...gle.com,
	elic@...dia.com, kuba@...nel.org, linux-rdma@...r.kernel.org,
	mbloch@...dia.com, netdev@...r.kernel.org, pabeni@...hat.com,
	roid@...dia.com, saeedm@...dia.com, shayd@...dia.com,
	vladbu@...dia.com, kernel test robot <lkp@...el.com>,
	Dan Carpenter <error27@...il.com>
Subject: Re: [PATCH -next v2] net/mlx5: Devcom, only use devcom after NULL
 check in mlx5_devcom_send_event()

On Mon, Aug 14, 2023 at 03:23:42PM +0800, Li Zetao wrote:
> There is a warning reported by kernel test robot:
> 
> smatch warnings:
> drivers/net/ethernet/mellanox/mlx5/core/lib/devcom.c:264
> 	mlx5_devcom_send_event() warn: variable dereferenced before
> 		IS_ERR check devcom (see line 259)
> 
> The reason for the warning is that the pointer is used before check, put
> the assignment to comp after devcom check to silence the warning.
> 
> Fixes: 88d162b47981 ("net/mlx5: Devcom, Infrastructure changes")
> Reported-by: kernel test robot <lkp@...el.com>
> Reported-by: Dan Carpenter <error27@...il.com>
> Closes: https://lore.kernel.org/r/202308041028.AkXYDwJ6-lkp@intel.com/
> Signed-off-by: Li Zetao <lizetao1@...wei.com>
> ---
> v1 -> v2: Modify the order of variable declarations to end up with reverse x-mas tree order.
> v1: https://lore.kernel.org/all/20230804092636.91357-1-lizetao1@huawei.com/
> 
>  drivers/net/ethernet/mellanox/mlx5/core/lib/devcom.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 

Thanks,
Reviewed-by: Leon Romanovsky <leonro@...dia.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ