lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110429220534.10316.63083.stgit@s20.home>
Date:	Fri, 29 Apr 2011 16:05:54 -0600
From:	Alex Williamson <alex.williamson@...hat.com>
To:	pugs@...e.org
Cc:	alex.williamson@...hat.com, linux-kernel@...r.kernel.org,
	linux-pci@...r.kernel.org, qemu-devel@...gnu.org, chrisw@...hat.com
Subject: [PATCH] vfio: Fix free in dma mapping error path

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

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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ