[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200928073836.GA3094@unreal>
Date: Mon, 28 Sep 2020 10:38:36 +0300
From: Leon Romanovsky <leon@...nel.org>
To: "Gustavo A. R. Silva" <gustavoars@...nel.org>
Cc: Saeed Mahameed <saeedm@...dia.com>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Roi Dayan <roid@...lanox.com>, Vlad Buslov <vladbu@...dia.com>,
Ariel Levkovich <lariel@...lanox.com>, netdev@...r.kernel.org,
linux-rdma@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH][next] net/mlx5e: Fix potential null pointer dereference
On Fri, Sep 25, 2020 at 11:49:13AM -0500, Gustavo A. R. Silva wrote:
> Calls to kzalloc() and kvzalloc() should be null-checked
> in order to avoid any potential failures. In this case,
> a potential null pointer dereference.
>
> Fix this by adding null checks for _parse_attr_ and _flow_
> right after allocation.
>
> Addresses-Coverity-ID: 1497154 ("Dereference before null check")
> Fixes: c620b772152b ("net/mlx5: Refactor tc flow attributes structure")
> Signed-off-by: Gustavo A. R. Silva <gustavoars@...nel.org>
> ---
> drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 10 ++++++----
> 1 file changed, 6 insertions(+), 4 deletions(-)
>
Thanks,
Reviewed-by: Leon Romanovsky <leonro@...dia.com>
Powered by blists - more mailing lists