From: Leon Romanovsky <leon@kernel.org>
To: YueHaibing <yuehaibing@huawei.com>
Cc: saeedm@nvidia.com, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, moshe@nvidia.com,
ogerlitz@mellanox.com, eli@mellanox.com,
jackm@dev.mellanox.co.il, roland@purestorage.com,
netdev@vger.kernel.org, linux-rdma@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net] net/mlx5: Fix uninitialized variable bug in outlen_write()
Date: Tue, 22 Nov 2022 15:06:35 +0200 [thread overview]
Message-ID: <Y3zJW+aFdlJDoRsw@unreal> (raw)
In-Reply-To: <20221121112204.24456-1-yuehaibing@huawei.com>
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>
next prev parent reply other threads:[~2022-11-22 13:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-21 11:22 [PATCH net] net/mlx5: Fix uninitialized variable bug in outlen_write() YueHaibing
2022-11-22 13:06 ` Leon Romanovsky [this message]
2022-11-23 5:01 ` Saeed Mahameed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y3zJW+aFdlJDoRsw@unreal \
--to=leon@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=eli@mellanox.com \
--cc=jackm@dev.mellanox.co.il \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=moshe@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=ogerlitz@mellanox.com \
--cc=pabeni@redhat.com \
--cc=roland@purestorage.com \
--cc=saeedm@nvidia.com \
--cc=yuehaibing@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.