pciback: fix circular loop in pcistub_match_one
PATCH 1/1 pciback: fix circular 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.
Thanks,
Jon
linux-2.6-xen-sparse/drivers/xen/pciback/pci_stub.c +3 -0
@@ -232,6 +232,9 @@ static int __devinit pcistub_match_one(s && dev->bus->number == pdev_id->bus && dev->devfn == pdev_id->devfn)return 1 ; + +if (dev == dev->bus->self) +break ; }return 0 ;
Quoted 3 lines · Jon Mason
The for loop in
pcistub_match_onewill loop forever if thedev->bus->selflinks to itself at the uppermost bridge. Adding a check to prevent linking back in on itself prevents this.
Also, please apply & push to our xenlinux tree (or I'll do it if you prefer)
Cheers,
Muli
Quoted 6 lines · Muli Ben-Yehuda
Quoted 3 lines · Jon Mason
The for loop in
pcistub_match_onewill loop forever if thedev->bus->selflinks to itself at the uppermost bridge. Adding a check to prevent linking back in on itself prevents this.Also, please apply & push to our xenlinux tree (or I'll do it if you prefer)
Will do.
Thanks,
Jon
Quoted 3 lines
Cheers,
Muli