From: Tom Lyon <pugs@lyon-about.com>
To: Alex Williamson <alex.williamson@redhat.com>
Cc: pugs@ieee.org, linux-kernel@vger.kernel.org,
linux-pci@vger.kernel.org, qemu-devel@nongnu.org,
chrisw@redhat.com
Subject: Re: [PATCH] vfio: Fix free in dma mapping error path
Date: Wed, 4 May 2011 12:19:07 -0700 [thread overview]
Message-ID: <201105041219.07488.pugs@lyon-about.com> (raw)
In-Reply-To: <20110429220534.10316.63083.stgit@s20.home>
On Friday, April 29, 2011 03:05:54 pm Alex Williamson wrote:
> This is allocated via vmalloc, so needs vfree, not kfree.
>
> Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
> ---
>
> drivers/vfio/vfio_dma.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/vfio/vfio_dma.c b/drivers/vfio/vfio_dma.c
> index cee1a25..4a488b6 100644
> --- a/drivers/vfio/vfio_dma.c
> +++ b/drivers/vfio/vfio_dma.c
> @@ -322,7 +322,7 @@ int vfio_dma_map_common(struct vfio_listener *listener,
> if (ret != npage) {
> printk(KERN_ERR "%s: get_user_pages_fast returns %d, not %d\n",
> __func__, ret, npage);
> - kfree(pages);
> + vfree(pages);
> ret = -EFAULT;
> goto out_lock;
> }
Applied. Thanks.
prev parent reply other threads:[~2011-05-04 19:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-29 22:05 Alex Williamson
2011-05-04 19:19 ` Tom Lyon [this message]
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=201105041219.07488.pugs@lyon-about.com \
--to=pugs@lyon-about.com \
--cc=alex.williamson@redhat.com \
--cc=chrisw@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=pugs@ieee.org \
--cc=qemu-devel@nongnu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®