linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net/mlx5: Use 'kvfree()' for memory allocated by 'kvzalloc()'
@ 2018-05-12 17:09 Christophe JAILLET
  2018-05-14 18:56 ` David Miller
  0 siblings, 1 reply; 4+ messages in thread
From: Christophe JAILLET @ 2018-05-12 17:09 UTC (permalink / raw)
  To: saeedm, matanb, leon, davem
  Cc: netdev, linux-rdma, linux-kernel, kernel-janitors, Christophe JAILLET

'out' is allocated with 'kvzalloc()'. 'kvfree()' must be used to free it.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 drivers/net/ethernet/mellanox/mlx5/core/vport.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/vport.c b/drivers/net/ethernet/mellanox/mlx5/core/vport.c
index 177e076b8d17..49968a4db758 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/vport.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/vport.c
@@ -511,7 +511,7 @@ int mlx5_query_nic_vport_system_image_guid(struct mlx5_core_dev *mdev,
 	*system_image_guid = MLX5_GET64(query_nic_vport_context_out, out,
 					nic_vport_context.system_image_guid);
 
-	kfree(out);
+	kvfree(out);
 
 	return 0;
 }
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] net/mlx5: Use 'kvfree()' for memory allocated by 'kvzalloc()'
  2018-05-12 17:09 [PATCH] net/mlx5: Use 'kvfree()' for memory allocated by 'kvzalloc()' Christophe JAILLET
@ 2018-05-14 18:56 ` David Miller
  2018-05-14 19:37   ` Christophe Jaillet
  2018-05-14 22:35   ` Saeed Mahameed
  0 siblings, 2 replies; 4+ messages in thread
From: David Miller @ 2018-05-14 18:56 UTC (permalink / raw)
  To: christophe.jaillet
  Cc: saeedm, matanb, leon, netdev, linux-rdma, linux-kernel, kernel-janitors

From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Date: Sat, 12 May 2018 19:09:25 +0200

> 'out' is allocated with 'kvzalloc()'. 'kvfree()' must be used to free it.
> 
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>

Saeed, I assume I will see this in one of your forthcoming pull
requests.

Thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] net/mlx5: Use 'kvfree()' for memory allocated by 'kvzalloc()'
  2018-05-14 18:56 ` David Miller
@ 2018-05-14 19:37   ` Christophe Jaillet
  2018-05-14 22:35   ` Saeed Mahameed
  1 sibling, 0 replies; 4+ messages in thread
From: Christophe Jaillet @ 2018-05-14 19:37 UTC (permalink / raw)
  To: David Miller
  Cc: saeedm, matanb, leon, netdev, linux-rdma, linux-kernel, kernel-janitors

Le 14/05/2018 à 20:56, David Miller a écrit :
> From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> Date: Sat, 12 May 2018 19:09:25 +0200
> 
>> 'out' is allocated with 'kvzalloc()'. 'kvfree()' must be used to free it.
>>
>> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> 
> Saeed, I assume I will see this in one of your forthcoming pull
> requests.
> 
> Thanks.
> 

I've send a v2 with additional 'kvfree()' fixes.

CJ

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] net/mlx5: Use 'kvfree()' for memory allocated by 'kvzalloc()'
  2018-05-14 18:56 ` David Miller
  2018-05-14 19:37   ` Christophe Jaillet
@ 2018-05-14 22:35   ` Saeed Mahameed
  1 sibling, 0 replies; 4+ messages in thread
From: Saeed Mahameed @ 2018-05-14 22:35 UTC (permalink / raw)
  To: David Miller
  Cc: christophe.jaillet, Saeed Mahameed, Matan Barak, Leon Romanovsky,
	Linux Netdev List, RDMA mailing list, linux-kernel,
	kernel-janitors

On Mon, May 14, 2018 at 11:56 AM, David Miller <davem@davemloft.net> wrote:
> From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> Date: Sat, 12 May 2018 19:09:25 +0200
>
>> 'out' is allocated with 'kvzalloc()'. 'kvfree()' must be used to free it.
>>
>> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
>
> Saeed, I assume I will see this in one of your forthcoming pull
> requests.
>
> Thanks.

In case this is for net-next,  I will apply v3 to mlx5-next once
Christophe adds the "Fixes" tags according to Eric's request.
if it is for net (RC) then you can go ahead and apply v3 to net branch.

Thanks,
Saeed.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-05-14 22:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-12 17:09 [PATCH] net/mlx5: Use 'kvfree()' for memory allocated by 'kvzalloc()' Christophe JAILLET
2018-05-14 18:56 ` David Miller
2018-05-14 19:37   ` Christophe Jaillet
2018-05-14 22: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).