All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] IB/rdmavt: free the userspace memory region with kfree instead of vfree
@ 2016-09-09  7:15 ` Colin King
  0 siblings, 0 replies; 8+ messages in thread
From: Colin King @ 2016-09-09  7:15 UTC (permalink / raw)
  To: Dennis Dalessandro, Doug Ledford, Sean Hefty, Hal Rosenstock,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA

From: Colin Ian King <colin.king-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>

The userspace memory region 'mr' is allocated with kzalloc in
__rvt_alloc_mr  however it is incorrectly being freed with vfree in
__rvt_free_mr. Fix this by using kfree to free it.

Signed-off-by: Colin Ian King <colin.king-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
---
 drivers/infiniband/sw/rdmavt/mr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/infiniband/sw/rdmavt/mr.c b/drivers/infiniband/sw/rdmavt/mr.c
index 80c4b6b..46b6497 100644
--- a/drivers/infiniband/sw/rdmavt/mr.c
+++ b/drivers/infiniband/sw/rdmavt/mr.c
@@ -294,7 +294,7 @@ static void __rvt_free_mr(struct rvt_mr *mr)
 {
 	rvt_deinit_mregion(&mr->mr);
 	rvt_free_lkey(&mr->mr);
-	vfree(mr);
+	kfree(mr);
 }
 
 /**
-- 
2.9.3

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH] IB/rdmavt: free the userspace memory region with kfree instead of vfree
@ 2016-09-09  7:15 ` Colin King
  0 siblings, 0 replies; 8+ messages in thread
From: Colin King @ 2016-09-09  7:15 UTC (permalink / raw)
  To: Dennis Dalessandro, Doug Ledford, Sean Hefty, Hal Rosenstock, linux-rdma
  Cc: linux-kernel

From: Colin Ian King <colin.king@canonical.com>

The userspace memory region 'mr' is allocated with kzalloc in
__rvt_alloc_mr  however it is incorrectly being freed with vfree in
__rvt_free_mr. Fix this by using kfree to free it.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/infiniband/sw/rdmavt/mr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/infiniband/sw/rdmavt/mr.c b/drivers/infiniband/sw/rdmavt/mr.c
index 80c4b6b..46b6497 100644
--- a/drivers/infiniband/sw/rdmavt/mr.c
+++ b/drivers/infiniband/sw/rdmavt/mr.c
@@ -294,7 +294,7 @@ static void __rvt_free_mr(struct rvt_mr *mr)
 {
 	rvt_deinit_mregion(&mr->mr);
 	rvt_free_lkey(&mr->mr);
-	vfree(mr);
+	kfree(mr);
 }
 
 /**
-- 
2.9.3

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

* Re: [PATCH] IB/rdmavt: free the userspace memory region with kfree instead of vfree
  2016-09-09  7:15 ` Colin King
@ 2016-09-12  4:52     ` Leon Romanovsky
  -1 siblings, 0 replies; 8+ messages in thread
From: Leon Romanovsky @ 2016-09-12  4:52 UTC (permalink / raw)
  To: Colin King
  Cc: Dennis Dalessandro, Doug Ledford, Sean Hefty, Hal Rosenstock,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 1220 bytes --]

On Fri, Sep 09, 2016 at 08:15:37AM +0100, Colin King wrote:
> From: Colin Ian King <colin.king-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
>
> The userspace memory region 'mr' is allocated with kzalloc in
> __rvt_alloc_mr  however it is incorrectly being freed with vfree in
> __rvt_free_mr. Fix this by using kfree to free it.
>
> Signed-off-by: Colin Ian King <colin.king-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>

Thanks,
Reviewed-by: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

> ---
>  drivers/infiniband/sw/rdmavt/mr.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/infiniband/sw/rdmavt/mr.c b/drivers/infiniband/sw/rdmavt/mr.c
> index 80c4b6b..46b6497 100644
> --- a/drivers/infiniband/sw/rdmavt/mr.c
> +++ b/drivers/infiniband/sw/rdmavt/mr.c
> @@ -294,7 +294,7 @@ static void __rvt_free_mr(struct rvt_mr *mr)
>  {
>  	rvt_deinit_mregion(&mr->mr);
>  	rvt_free_lkey(&mr->mr);
> -	vfree(mr);
> +	kfree(mr);
>  }
>
>  /**
> --
> 2.9.3
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: [PATCH] IB/rdmavt: free the userspace memory region with kfree instead of vfree
@ 2016-09-12  4:52     ` Leon Romanovsky
  0 siblings, 0 replies; 8+ messages in thread
From: Leon Romanovsky @ 2016-09-12  4:52 UTC (permalink / raw)
  To: Colin King
  Cc: Dennis Dalessandro, Doug Ledford, Sean Hefty, Hal Rosenstock,
	linux-rdma, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1117 bytes --]

On Fri, Sep 09, 2016 at 08:15:37AM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The userspace memory region 'mr' is allocated with kzalloc in
> __rvt_alloc_mr  however it is incorrectly being freed with vfree in
> __rvt_free_mr. Fix this by using kfree to free it.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Thanks,
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>

> ---
>  drivers/infiniband/sw/rdmavt/mr.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/infiniband/sw/rdmavt/mr.c b/drivers/infiniband/sw/rdmavt/mr.c
> index 80c4b6b..46b6497 100644
> --- a/drivers/infiniband/sw/rdmavt/mr.c
> +++ b/drivers/infiniband/sw/rdmavt/mr.c
> @@ -294,7 +294,7 @@ static void __rvt_free_mr(struct rvt_mr *mr)
>  {
>  	rvt_deinit_mregion(&mr->mr);
>  	rvt_free_lkey(&mr->mr);
> -	vfree(mr);
> +	kfree(mr);
>  }
>
>  /**
> --
> 2.9.3
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: [PATCH] IB/rdmavt: free the userspace memory region with kfree instead of vfree
  2016-09-09  7:15 ` Colin King
@ 2016-09-13 12:44     ` Dalessandro, Dennis
  -1 siblings, 0 replies; 8+ messages in thread
From: Dalessandro, Dennis @ 2016-09-13 12:44 UTC (permalink / raw)
  To: colin.king-Z7WLFzj8eWMS+FvcfC7Uqw,
	hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA,
	dledford-H+wXaHxf7aLQT0dZR+AlfA, Hefty, Sean
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA

On Fri, 2016-09-09 at 08:15 +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> The userspace memory region 'mr' is allocated with kzalloc in
> __rvt_alloc_mr  however it is incorrectly being freed with vfree in
> __rvt_free_mr. Fix this by using kfree to free it.
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  drivers/infiniband/sw/rdmavt/mr.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/infiniband/sw/rdmavt/mr.c
> b/drivers/infiniband/sw/rdmavt/mr.c
> index 80c4b6b..46b6497 100644
> --- a/drivers/infiniband/sw/rdmavt/mr.c
> +++ b/drivers/infiniband/sw/rdmavt/mr.c
> @@ -294,7 +294,7 @@ static void __rvt_free_mr(struct rvt_mr *mr)
>  {
>  	rvt_deinit_mregion(&mr->mr);
>  	rvt_free_lkey(&mr->mr);
> -	vfree(mr);
> +	kfree(mr);
>  }
>  
>  /**

Thanks!

Acked-by: Dennis Dalessandro <dennis.dalessandro@intel.com>

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

* Re: [PATCH] IB/rdmavt: free the userspace memory region with kfree instead of vfree
@ 2016-09-13 12:44     ` Dalessandro, Dennis
  0 siblings, 0 replies; 8+ messages in thread
From: Dalessandro, Dennis @ 2016-09-13 12:44 UTC (permalink / raw)
  To: colin.king, hal.rosenstock, linux-rdma, dledford, Hefty, Sean
  Cc: linux-kernel

On Fri, 2016-09-09 at 08:15 +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> The userspace memory region 'mr' is allocated with kzalloc in
> __rvt_alloc_mr  however it is incorrectly being freed with vfree in
> __rvt_free_mr. Fix this by using kfree to free it.
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  drivers/infiniband/sw/rdmavt/mr.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/infiniband/sw/rdmavt/mr.c
> b/drivers/infiniband/sw/rdmavt/mr.c
> index 80c4b6b..46b6497 100644
> --- a/drivers/infiniband/sw/rdmavt/mr.c
> +++ b/drivers/infiniband/sw/rdmavt/mr.c
> @@ -294,7 +294,7 @@ static void __rvt_free_mr(struct rvt_mr *mr)
>  {
>  	rvt_deinit_mregion(&mr->mr);
>  	rvt_free_lkey(&mr->mr);
> -	vfree(mr);
> +	kfree(mr);
>  }
>  
>  /**

Thanks!

Acked-by: Dennis Dalessandro <dennis.dalessandro@intel.com>

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

* Re: [PATCH] IB/rdmavt: free the userspace memory region with kfree instead of vfree
  2016-09-09  7:15 ` Colin King
@ 2016-09-16 18:10     ` Doug Ledford
  -1 siblings, 0 replies; 8+ messages in thread
From: Doug Ledford @ 2016-09-16 18:10 UTC (permalink / raw)
  To: Colin King, Dennis Dalessandro, Sean Hefty, Hal Rosenstock,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA


[-- Attachment #1.1: Type: text/plain, Size: 1024 bytes --]

On 9/9/2016 3:15 AM, Colin King wrote:
> From: Colin Ian King <colin.king-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
> 
> The userspace memory region 'mr' is allocated with kzalloc in
> __rvt_alloc_mr  however it is incorrectly being freed with vfree in
> __rvt_free_mr. Fix this by using kfree to free it.
> 
> Signed-off-by: Colin Ian King <colin.king-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
> ---
>  drivers/infiniband/sw/rdmavt/mr.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/infiniband/sw/rdmavt/mr.c b/drivers/infiniband/sw/rdmavt/mr.c
> index 80c4b6b..46b6497 100644
> --- a/drivers/infiniband/sw/rdmavt/mr.c
> +++ b/drivers/infiniband/sw/rdmavt/mr.c
> @@ -294,7 +294,7 @@ static void __rvt_free_mr(struct rvt_mr *mr)
>  {
>  	rvt_deinit_mregion(&mr->mr);
>  	rvt_free_lkey(&mr->mr);
> -	vfree(mr);
> +	kfree(mr);
>  }
>  
>  /**
> 

Thanks, applied.

-- 
Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
    GPG Key ID: 0E572FDD


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 884 bytes --]

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

* Re: [PATCH] IB/rdmavt: free the userspace memory region with kfree instead of vfree
@ 2016-09-16 18:10     ` Doug Ledford
  0 siblings, 0 replies; 8+ messages in thread
From: Doug Ledford @ 2016-09-16 18:10 UTC (permalink / raw)
  To: Colin King, Dennis Dalessandro, Sean Hefty, Hal Rosenstock, linux-rdma
  Cc: linux-kernel


[-- Attachment #1.1: Type: text/plain, Size: 943 bytes --]

On 9/9/2016 3:15 AM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> The userspace memory region 'mr' is allocated with kzalloc in
> __rvt_alloc_mr  however it is incorrectly being freed with vfree in
> __rvt_free_mr. Fix this by using kfree to free it.
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  drivers/infiniband/sw/rdmavt/mr.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/infiniband/sw/rdmavt/mr.c b/drivers/infiniband/sw/rdmavt/mr.c
> index 80c4b6b..46b6497 100644
> --- a/drivers/infiniband/sw/rdmavt/mr.c
> +++ b/drivers/infiniband/sw/rdmavt/mr.c
> @@ -294,7 +294,7 @@ static void __rvt_free_mr(struct rvt_mr *mr)
>  {
>  	rvt_deinit_mregion(&mr->mr);
>  	rvt_free_lkey(&mr->mr);
> -	vfree(mr);
> +	kfree(mr);
>  }
>  
>  /**
> 

Thanks, applied.

-- 
Doug Ledford <dledford@redhat.com>
    GPG Key ID: 0E572FDD


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 884 bytes --]

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

end of thread, other threads:[~2016-09-16 18:10 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-09  7:15 [PATCH] IB/rdmavt: free the userspace memory region with kfree instead of vfree Colin King
2016-09-09  7:15 ` Colin King
     [not found] ` <20160909071537.18821-1-colin.king-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
2016-09-12  4:52   ` Leon Romanovsky
2016-09-12  4:52     ` Leon Romanovsky
2016-09-13 12:44   ` Dalessandro, Dennis
2016-09-13 12:44     ` Dalessandro, Dennis
2016-09-16 18:10   ` Doug Ledford
2016-09-16 18:10     ` Doug Ledford

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.