WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] amd-iommu: drop locks before printing err

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] amd-iommu: drop locks before printing error messages
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 03 Feb 2009 20:50:54 -0800
Delivery-date: Tue, 03 Feb 2009 20:51:19 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1233314012 0
# Node ID 102576868e8d2b4a7835c229bd3ff57dec4b96b0
# Parent  2d70ad9c3bc7546e8bd53f55c5f0d05c5852a8a1
amd-iommu: drop locks before printing error messages

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
---
 xen/drivers/passthrough/amd/iommu_map.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff -r 2d70ad9c3bc7 -r 102576868e8d xen/drivers/passthrough/amd/iommu_map.c
--- a/xen/drivers/passthrough/amd/iommu_map.c   Fri Jan 30 11:13:06 2009 +0000
+++ b/xen/drivers/passthrough/amd/iommu_map.c   Fri Jan 30 11:13:32 2009 +0000
@@ -461,8 +461,8 @@ int amd_iommu_map_page(struct domain *d,
     iommu_l2e = iommu_l2e_from_pfn(hd->root_table, hd->paging_mode, gfn);
     if ( iommu_l2e == 0 )
     {
+        spin_unlock_irqrestore(&hd->mapping_lock, flags);
         amd_iov_error("Invalid IO pagetable entry gfn = %lx\n", gfn);
-        spin_unlock_irqrestore(&hd->mapping_lock, flags);
         return -EFAULT;
     }
     set_iommu_l1e_present(iommu_l2e, gfn, (u64)mfn << PAGE_SHIFT, iw, ir);
@@ -493,8 +493,8 @@ int amd_iommu_unmap_page(struct domain *
 
     if ( iommu_l2e == 0 )
     {
+        spin_unlock_irqrestore(&hd->mapping_lock, flags);
         amd_iov_error("Invalid IO pagetable entry gfn = %lx\n", gfn);
-        spin_unlock_irqrestore(&hd->mapping_lock, flags);
         return -EFAULT;
     }
 
@@ -533,9 +533,9 @@ int amd_iommu_reserve_domain_unity_map(
 
         if ( iommu_l2e == 0 )
         {
-            amd_iov_error(
-            "Invalid IO pagetable entry phys_addr = %lx\n", phys_addr);
             spin_unlock_irqrestore(&hd->mapping_lock, flags);
+            amd_iov_error("Invalid IO pagetable entry phys_addr = %lx\n",
+                          phys_addr);
             return -EFAULT;
         }
 
@@ -582,8 +582,8 @@ int amd_iommu_sync_p2m(struct domain *d)
         if ( iommu_l2e == 0 )
         {
             spin_unlock(&d->page_alloc_lock);
+            spin_unlock_irqrestore(&hd->mapping_lock, flags);
             amd_iov_error("Invalid IO pagetable entry gfn = %lx\n", gfn);
-            spin_unlock_irqrestore(&hd->mapping_lock, flags);
             return -EFAULT;
         }
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] amd-iommu: drop locks before printing error messages, Xen patchbot-unstable <=