diff options
author | rsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-12-29 06:16:29 +0000 |
---|---|---|
committer | rsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-12-29 06:16:29 +0000 |
commit | 4661d5df04ce804e454509922fd54f45332553da (patch) | |
tree | e42d8c9376296078edfa924dd132f760228d0ef6 /MdeModulePkg | |
parent | de028a62ded3c0ab76d33accec4d8666cb2834bf (diff) | |
download | edk2-4661d5df04ce804e454509922fd54f45332553da.zip edk2-4661d5df04ce804e454509922fd54f45332553da.tar.gz edk2-4661d5df04ce804e454509922fd54f45332553da.tar.bz2 |
Fix a bug about linked list manipulation in DegradeResource() in PCI bus driver.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9622 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg')
-rw-r--r-- | MdeModulePkg/Bus/Pci/PciBusDxe/PciResourceSupport.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciResourceSupport.c b/MdeModulePkg/Bus/Pci/PciBusDxe/PciResourceSupport.c index d5f553b..b0637c9 100644 --- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciResourceSupport.c +++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciResourceSupport.c @@ -1050,6 +1050,7 @@ DegradeResource ( PCI_IO_DEVICE *Temp;
LIST_ENTRY *ChildDeviceLink;
LIST_ENTRY *ChildNodeLink;
+ LIST_ENTRY *NextChildNodeLink;
PCI_RESOURCE_NODE *TempNode;
//
@@ -1064,12 +1065,13 @@ DegradeResource ( ChildNodeLink = Mem64Node->ChildList.ForwardLink;
while (ChildNodeLink != &Mem64Node->ChildList) {
TempNode = RESOURCE_NODE_FROM_LINK (ChildNodeLink);
+ NextChildNodeLink = ChildNodeLink->ForwardLink;
if (TempNode->PciDev == Temp) {
RemoveEntryList (ChildNodeLink);
InsertResourceNode (Mem32Node, TempNode);
}
- ChildNodeLink = TempNode->Link.ForwardLink;
+ ChildNodeLink = NextChildNodeLink;
}
}
@@ -1077,12 +1079,13 @@ DegradeResource ( ChildNodeLink = PMem64Node->ChildList.ForwardLink;
while (ChildNodeLink != &PMem64Node->ChildList) {
TempNode = RESOURCE_NODE_FROM_LINK (ChildNodeLink);
+ NextChildNodeLink = ChildNodeLink->ForwardLink;
if (TempNode->PciDev == Temp) {
RemoveEntryList (ChildNodeLink);
InsertResourceNode (PMem32Node, TempNode);
}
- ChildNodeLink = TempNode->Link.ForwardLink;
+ ChildNodeLink = NextChildNodeLink;
}
}
|