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] pci_remove_device: fix linked list discipline

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] pci_remove_device: fix linked list discipline
From: Tim Deegan <Tim.Deegan@xxxxxxxxxx>
Date: Wed, 18 May 2011 09:53:15 +0100
Delivery-date: Wed, 18 May 2011 01:54:04 -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
User-agent: Mercurial-patchbomb/1.6.4
# HG changeset patch
# User Tim Deegan <Tim.Deegan@xxxxxxxxxx>
# Date 1305708740 -3600
# Node ID 7b12c46b18777655c8a5f8290286f5699c77c335
# Parent  f531ed84b0661aa6863dc86d5e5638642bc47301
pci_remove_device: fix linked list discipline

Signed-off-by: Tim Deegan <Tim.Deegan@xxxxxxxxxx>

diff -r f531ed84b066 -r 7b12c46b1877 xen/drivers/passthrough/pci.c
--- a/xen/drivers/passthrough/pci.c     Tue May 17 17:32:19 2011 +0100
+++ b/xen/drivers/passthrough/pci.c     Wed May 18 09:52:20 2011 +0100
@@ -173,11 +173,11 @@ out:
 
 int pci_remove_device(u8 bus, u8 devfn)
 {
-    struct pci_dev *pdev;
+    struct pci_dev *pdev, *tmp;
     int ret = -ENODEV;
 
     spin_lock(&pcidevs_lock);
-    list_for_each_entry ( pdev, &alldevs_list, alldevs_list )
+    list_for_each_entry_safe ( pdev, tmp, &alldevs_list, alldevs_list )
         if ( pdev->bus == bus && pdev->devfn == devfn )
         {
             ret = iommu_remove_device(pdev);

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

<Prev in Thread] Current Thread [Next in Thread>