[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <03f5d2ac3d4e312cffcbc7e61cc10815c28dfeb7.camel@mellanox.com>
Date: Tue, 19 Mar 2019 22:37:46 +0000
From: Saeed Mahameed <saeedm@...lanox.com>
To: "pakki001@....edu" <pakki001@....edu>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
Boris Pismenny <borisp@...lanox.com>,
"weiyongjun1@...wei.com" <weiyongjun1@...wei.com>,
"kjlu@....edu" <kjlu@....edu>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
Ilya Lesokhin <ilyal@...lanox.com>,
"davem@...emloft.net" <davem@...emloft.net>,
"leon@...nel.org" <leon@...nel.org>
Subject: Re: [PATCH v4] net: mlx5: Add a missing check on idr_find, free buf
On Tue, 2019-03-19 at 16:42 -0500, Aditya Pakki wrote:
> idr_find() can return a NULL value to 'flow' which is used without a
> check. The patch adds a check to avoid potential NULL pointer
> dereference.
>
> In case of mlx5_fpga_sbu_conn_sendmsg() failure, free buf allocated
> using kzalloc.
>
> Fixes: ab412e1dd7db ("net/mlx5: Accel, add TLS rx offload routines")
> ---
> v3: Reorder buf allocations and flow check.
> v2: failure to return in case of flow failure.
> v1: Failed to free buf in case of flow failure.
>
> Signed-off-by: Aditya Pakki <pakki001@....edu>
> ---
> drivers/net/ethernet/mellanox/mlx5/core/fpga/tls.c | 14 +++++++++++-
> --
> 1 file changed, 11 insertions(+), 3 deletions(-)
>
Applied to net-mlx5, will be sent upstream shortly,
You messed up the Signed-off tag, it also should have been part of the
commit message, but don't worry, i fixed it up and added Yuval's
Reviewed-by.
Thanks Adeitya for handling all of the comments.
Saeed.
Powered by blists - more mailing lists