|   | 
      | 
  
  
      | 
      | 
  
 
     | 
    | 
  
  
     | 
    | 
  
  
    |   | 
      | 
  
  
    | 
         
xen-changelog
[Xen-changelog] [xen-unstable] [PCI] back: Fix potential infinite	loop i
 
# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Node ID 10dc10473c3fae08ae2decdbc8c7bee40df56d93
# Parent  10b05c2e79475f90330fa061b46d6df7e71a41c5
[PCI] back: Fix potential infinite loop in pcistub_match_one().
The for loop in pcistub_match_one will loop forever if the
dev->bus->self links to itself at the uppermost bridge.  Adding a
check to prevent linking back in on itself prevents this.
Signed-off-by: Jon Mason <jdmason@xxxxxxxxxx>
---
 linux-2.6-xen-sparse/drivers/xen/pciback/pci_stub.c |    4 ++++
 1 files changed, 4 insertions(+)
diff -r 10b05c2e7947 -r 10dc10473c3f 
linux-2.6-xen-sparse/drivers/xen/pciback/pci_stub.c
--- a/linux-2.6-xen-sparse/drivers/xen/pciback/pci_stub.c       Tue Aug 01 
18:08:01 2006 +0100
+++ b/linux-2.6-xen-sparse/drivers/xen/pciback/pci_stub.c       Wed Aug 02 
09:15:26 2006 +0100
@@ -232,6 +232,10 @@ static int __devinit pcistub_match_one(s
                    && dev->bus->number == pdev_id->bus
                    && dev->devfn == pdev_id->devfn)
                        return 1;
+
+               /* Sometimes topmost bridge links to itself. */
+               if (dev == dev->bus->self)
+                       break;
        }
 
        return 0;
_______________________________________________
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] [PCI] back: Fix potential infinite	loop in pcistub_match_one().,
Xen patchbot-unstable <=
  
 |  
  
 | 
    | 
  
  
    |   | 
    |