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] [PCI] back: Fix potential infinite loop i

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [PCI] back: Fix potential infinite loop in pcistub_match_one().
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 02 Aug 2006 09:30:16 +0000
Delivery-date: Wed, 02 Aug 2006 02:37:36 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/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 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 <=