From: "Jan Beulich" <JBeulich@novell.com>
To: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Cc: ZhouPeng <zpengxen@gmail.com>
Subject: [PATCH] VT-d: fix two map_domain_page() leaks
Date: Thu, 16 Dec 2010 15:38:46 +0000 [thread overview]
Message-ID: <4D0A409602000078000286C0@vpn.id2.novell.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 655 bytes --]
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Tested-by: ZhouPeng <zpengxen@gmail.com>
--- a/xen/drivers/passthrough/vtd/iommu.c
+++ b/xen/drivers/passthrough/vtd/iommu.c
@@ -1331,6 +1331,7 @@ int domain_context_mapping_one(
if ( context_set_domain_id(context, domain, iommu) )
{
spin_unlock(&iommu->lock);
+ unmap_vtd_domain_page(context_entries);
return -EFAULT;
}
@@ -1672,6 +1673,7 @@ static int intel_iommu_map_page(
if ( old.val == new.val )
{
spin_unlock(&hd->mapping_lock);
+ unmap_vtd_domain_page(page);
return 0;
}
*pte = new;
[-- Attachment #2: vtd-map-page-leak.patch --]
[-- Type: text/plain, Size: 649 bytes --]
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Tested-by: ZhouPeng <zpengxen@gmail.com>
--- a/xen/drivers/passthrough/vtd/iommu.c
+++ b/xen/drivers/passthrough/vtd/iommu.c
@@ -1331,6 +1331,7 @@ int domain_context_mapping_one(
if ( context_set_domain_id(context, domain, iommu) )
{
spin_unlock(&iommu->lock);
+ unmap_vtd_domain_page(context_entries);
return -EFAULT;
}
@@ -1672,6 +1673,7 @@ static int intel_iommu_map_page(
if ( old.val == new.val )
{
spin_unlock(&hd->mapping_lock);
+ unmap_vtd_domain_page(page);
return 0;
}
*pte = new;
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
reply other threads:[~2010-12-16 15:38 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=4D0A409602000078000286C0@vpn.id2.novell.com \
--to=jbeulich@novell.com \
--cc=xen-devel@lists.xensource.com \
--cc=zpengxen@gmail.com \
/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;
as well as URLs for NNTP newsgroup(s).