Commit 4c2319a
Mohammad Kabat
net/mlx5: Fix uninitialized variable bug in outlen_write()
Bugzilla: https://bugzilla.redhat.com/2112947
Upstream-status: v6.1-rc8
commit 3f5769a
Author: YueHaibing <yuehaibing@huawei.com>
Date: Mon Nov 21 19:22:04 2022 +0800
net/mlx5: Fix uninitialized variable bug in outlen_write()
If sscanf() return 0, outlen is uninitialized and used in kzalloc(),
this is unexpected. We should return -EINVAL if the string is invalid.
Fixes: e126ba9 ("mlx5: Add driver for Mellanox Connect-IB adapters")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: Mohammad Kabat <mkabat@redhat.com>1 parent c46d6d3 commit 4c2319a
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1497 | 1497 | | |
1498 | 1498 | | |
1499 | 1499 | | |
1500 | | - | |
1501 | | - | |
| 1500 | + | |
| 1501 | + | |
1502 | 1502 | | |
1503 | 1503 | | |
1504 | 1504 | | |
| |||
0 commit comments