From: "Dalessandro, Dennis" <dennis.dalessandro-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
To: "colin.king-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org"
<colin.king-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>,
"hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org"
<hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
"linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org"
<dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
"Hefty,
Sean" <sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: "linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH] IB/rdmavt: free the userspace memory region with kfree instead of vfree
Date: Tue, 13 Sep 2016 12:44:28 +0000 [thread overview]
Message-ID: <1473770664.1004.10.camel@intel.com> (raw)
In-Reply-To: <20160909071537.18821-1-colin.king-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
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>
WARNING: multiple messages have this Message-ID (diff)
From: "Dalessandro, Dennis" <dennis.dalessandro@intel.com>
To: "colin.king@canonical.com" <colin.king@canonical.com>,
"hal.rosenstock@gmail.com" <hal.rosenstock@gmail.com>,
"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
"dledford@redhat.com" <dledford@redhat.com>,
"Hefty, Sean" <sean.hefty@intel.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] IB/rdmavt: free the userspace memory region with kfree instead of vfree
Date: Tue, 13 Sep 2016 12:44:28 +0000 [thread overview]
Message-ID: <1473770664.1004.10.camel@intel.com> (raw)
In-Reply-To: <20160909071537.18821-1-colin.king@canonical.com>
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>
next prev parent reply other threads:[~2016-09-13 12:44 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2016-09-13 12:44 ` Dalessandro, Dennis
2016-09-16 18:10 ` Doug Ledford
2016-09-16 18:10 ` Doug Ledford
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1473770664.1004.10.camel@intel.com \
--to=dennis.dalessandro-ral2jqcrhueavxtiumwx3w@public.gmane.org \
--cc=colin.king-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org \
--cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.