* [PATCH] net/mlx5: prevent memory leak in mlx5_fpga_conn_create_cq
@ 2019-09-25 3:20 Navid Emamdoost
2019-09-27 8:33 ` David Miller
0 siblings, 1 reply; 3+ messages in thread
From: Navid Emamdoost @ 2019-09-25 3:20 UTC (permalink / raw)
Cc: emamd001, smccaman, kjlu, Navid Emamdoost, Boris Pismenny,
Saeed Mahameed, Leon Romanovsky, David S. Miller, Yishai Hadas,
Maxim Mikityanskiy, Eran Ben Elisha, Tariq Toukan, Bodong Wang,
netdev, linux-rdma, linux-kernel
In mlx5_fpga_conn_create_cq if mlx5_vector2eqn fails the allocated
memory should be released.
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
---
drivers/net/ethernet/mellanox/mlx5/core/fpga/conn.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fpga/conn.c b/drivers/net/ethernet/mellanox/mlx5/core/fpga/conn.c
index 4c50efe4e7f1..61021133029e 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/fpga/conn.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/fpga/conn.c
@@ -464,8 +464,10 @@ static int mlx5_fpga_conn_create_cq(struct mlx5_fpga_conn *conn, int cq_size)
}
err = mlx5_vector2eqn(mdev, smp_processor_id(), &eqn, &irqn);
- if (err)
+ if (err) {
+ kvfree(in);
goto err_cqwq;
+ }
cqc = MLX5_ADDR_OF(create_cq_in, in, cq_context);
MLX5_SET(cqc, cqc, log_cq_size, ilog2(cq_size));
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] net/mlx5: prevent memory leak in mlx5_fpga_conn_create_cq
2019-09-25 3:20 [PATCH] net/mlx5: prevent memory leak in mlx5_fpga_conn_create_cq Navid Emamdoost
@ 2019-09-27 8:33 ` David Miller
2019-10-15 20:35 ` Saeed Mahameed
0 siblings, 1 reply; 3+ messages in thread
From: David Miller @ 2019-09-27 8:33 UTC (permalink / raw)
To: navid.emamdoost
Cc: emamd001, smccaman, kjlu, borisp, saeedm, leon, yishaih, maximmi,
eranbe, tariqt, bodong, netdev, linux-rdma, linux-kernel
From: Navid Emamdoost <navid.emamdoost@gmail.com>
Date: Tue, 24 Sep 2019 22:20:34 -0500
> In mlx5_fpga_conn_create_cq if mlx5_vector2eqn fails the allocated
> memory should be released.
>
> Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Saeed, please queue this up.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] net/mlx5: prevent memory leak in mlx5_fpga_conn_create_cq
2019-09-27 8:33 ` David Miller
@ 2019-10-15 20:35 ` Saeed Mahameed
0 siblings, 0 replies; 3+ messages in thread
From: Saeed Mahameed @ 2019-10-15 20:35 UTC (permalink / raw)
To: navid.emamdoost, davem
Cc: Maxim Mikityanskiy, Bodong Wang, Yishai Hadas, emamd001,
Tariq Toukan, linux-rdma, linux-kernel, Eran Ben Elisha,
Boris Pismenny, smccaman, leon, kjlu, netdev
On Fri, 2019-09-27 at 10:33 +0200, David Miller wrote:
> From: Navid Emamdoost <navid.emamdoost@gmail.com>
> Date: Tue, 24 Sep 2019 22:20:34 -0500
>
> > In mlx5_fpga_conn_create_cq if mlx5_vector2eqn fails the allocated
> > memory should be released.
> >
> > Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
>
> Saeed, please queue this up.
Applied to net-mlx5 branch will send it to net branch shortly.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-10-15 20:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-25 3:20 [PATCH] net/mlx5: prevent memory leak in mlx5_fpga_conn_create_cq Navid Emamdoost
2019-09-27 8:33 ` David Miller
2019-10-15 20:35 ` Saeed Mahameed
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).