Messages in this thread | | | Date | Tue, 22 Nov 2022 15:06:35 +0200 | From | Leon Romanovsky <> | 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@huawei.com> > --- > drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) >
Thanks, Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
| |