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-devel

[Xen-devel] [PATCH][vtd] Fix a missing spin_unlock_irqrestore()

To: "Keir Fraser" <keir.fraser@xxxxxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH][vtd] Fix a missing spin_unlock_irqrestore()
From: "Cui, Dexuan" <dexuan.cui@xxxxxxxxx>
Date: Mon, 4 Aug 2008 17:58:11 +0800
Cc:
Delivery-date: Mon, 04 Aug 2008 02:59:29 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acj2GJmZDtZGba9dR7mgSpRD3s3CIQ==
Thread-topic: [PATCH][vtd] Fix a missing spin_unlock_irqrestore()
diff -r f69a23b209c4 xen/drivers/passthrough/vtd/iommu.c
--- a/xen/drivers/passthrough/vtd/iommu.c   Fri Aug 01 15:38:07 2008
+0100
+++ b/xen/drivers/passthrough/vtd/iommu.c   Mon Aug 04 17:55:53 2008
+0800
@@ -632,7 +632,10 @@ static int iommu_set_root_entry(struct i

     iommu->root_maddr = alloc_pgtable_maddr();
     if ( iommu->root_maddr == 0 )
+    {
+        spin_unlock_irqrestore(&iommu->register_lock, flags);
         return -ENOMEM;
+    }

     dmar_writeq(iommu->reg, DMAR_RTADDR_REG, iommu->root_maddr);
     cmd = iommu->gcmd | DMA_GCMD_SRTP;

Signed-off-by: Dexuan Cui <dexuan.cui@xxxxxxxxx>

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH][vtd] Fix a missing spin_unlock_irqrestore(), Cui, Dexuan <=