This is allocated via vmalloc, so needs vfree, not kfree.

Signed-off-by: Alex Williamson <alex.william...@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;
        }


Reply via email to