diff options
author | Ruiyu Ni <ruiyu.ni@intel.com> | 2013-09-26 05:53:11 +0000 |
---|---|---|
committer | niruiyu <niruiyu@6f19259b-4bc3-4df7-8a09-765794883524> | 2013-09-26 05:53:11 +0000 |
commit | e5a9b63cdfcef8d7d52ea011fcee731e5ef4ede6 (patch) | |
tree | 4580b217434bdf877fd6882f4811018d2bac086e /IntelFrameworkModulePkg | |
parent | 798e4d22c4db5b710ca5fa98f5ee47aeeae7f9ac (diff) | |
download | edk2-platforms-e5a9b63cdfcef8d7d52ea011fcee731e5ef4ede6.tar.xz |
Fix the BdsExpandPartitionPartialDevicePathToFull() hang issue by duplicates BlockIoDevicePath when the CachedDevicePath returned from BdsLibDelPartMatchInstance() is NULL.
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Chao B Zhang <chao.b.zhang@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14733 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'IntelFrameworkModulePkg')
-rw-r--r-- | IntelFrameworkModulePkg/Library/GenericBdsLib/BdsBoot.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsBoot.c b/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsBoot.c index 06ba0fcf79..29afe45f35 100644 --- a/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsBoot.c +++ b/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsBoot.c @@ -2637,17 +2637,16 @@ BdsExpandPartitionPartialDevicePathToFull ( TempNewDevicePath = CachedDevicePath;
CachedDevicePath = BdsLibDelPartMatchInstance (CachedDevicePath, BlockIoDevicePath);
FreePool(TempNewDevicePath);
+ }
- TempNewDevicePath = CachedDevicePath;
- CachedDevicePath = AppendDevicePathInstance (BlockIoDevicePath, CachedDevicePath);
- if (TempNewDevicePath != NULL) {
- FreePool(TempNewDevicePath);
- }
- } else {
+ if (CachedDevicePath != NULL) {
TempNewDevicePath = CachedDevicePath;
CachedDevicePath = AppendDevicePathInstance (BlockIoDevicePath, CachedDevicePath);
FreePool(TempNewDevicePath);
+ } else {
+ CachedDevicePath = DuplicateDevicePath (BlockIoDevicePath);
}
+
//
// Here limit the device path instance number to 12, which is max number for a system support 3 IDE controller
// If the user try to boot many OS in different HDs or partitions, in theory,
|