[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y3zJW+aFdlJDoRsw@unreal>
Date: Tue, 22 Nov 2022 15:06:35 +0200
From: Leon Romanovsky <leon@...nel.org>
To: YueHaibing <yuehaibing@...wei.com>
Cc: saeedm@...dia.com, davem@...emloft.net, edumazet@...gle.com,
kuba@...nel.org, pabeni@...hat.com, moshe@...dia.com,
ogerlitz@...lanox.com, eli@...lanox.com, jackm@....mellanox.co.il,
roland@...estorage.com, netdev@...r.kernel.org,
linux-rdma@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net] net/mlx5: Fix uninitialized variable bug in
outlen_write()
On Mon, Nov 21, 2022 at 07:22:04PM +0800, YueHaibing wrote:
> If sscanf() return 0, outlen is uninitialized and used in kzalloc(),
> this is unexpected. We should return -EINVAL if the string is invalid.
>
> Fixes: e126ba97dba9 ("mlx5: Add driver for Mellanox Connect-IB adapters")
> Signed-off-by: YueHaibing <yuehaibing@...wei.com>
> ---
> drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
Thanks,
Reviewed-by: Leon Romanovsky <leonro@...dia.com>
Powered by blists - more mailing lists