diff options
author | Zhichao Gao <zhichao.gao@intel.com> | 2020-07-02 15:31:53 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2020-07-15 01:18:13 +0000 |
commit | c7195b9ec3c5f8f40119c96ac4a0ab1e8cebe9dc (patch) | |
tree | 6420d40e19dac9b286afdf472bfc41d2b5461960 /MdeModulePkg/Universal | |
parent | e906346dcb80fce588ac774c8ec9694b62f0a257 (diff) | |
download | edk2-c7195b9ec3c5f8f40119c96ac4a0ab1e8cebe9dc.zip edk2-c7195b9ec3c5f8f40119c96ac4a0ab1e8cebe9dc.tar.gz edk2-c7195b9ec3c5f8f40119c96ac4a0ab1e8cebe9dc.tar.bz2 |
MdeModulePkg/PartitionDxe: Add already start check for child hanldes
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2823
The partition binding driver would run serval times during BDS.
If the partition support MBR, it would pass the first connection
in MBR partition child handler. The second connect for the same
device would return already started which would be treated as
not found. And it would continue to run next partition child
handler check. That is incorrect behavior to do next check if one
of the routine functions is passed. It may cause one device
installed serval partition child handle on it.
So treat the EFI_ALREADY_STARTED as EFI_SUCCESS to avoid incorrect
next partition child handle check.
Cc: Hao A Wu <hao.a.wu@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Diffstat (limited to 'MdeModulePkg/Universal')
-rw-r--r-- | MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c b/MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c index d1c878a..6a43c3c 100644 --- a/MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c +++ b/MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c @@ -1276,6 +1276,15 @@ PartitionInstallChildHandle ( } else {
FreePool (Private->DevicePath);
FreePool (Private);
+
+ //
+ // if the Status == EFI_ALREADY_STARTED, it means the child handles
+ // are already installed. So return EFI_SUCCESS to avoid do the next
+ // partition type check.
+ //
+ if (Status == EFI_ALREADY_STARTED) {
+ Status = EFI_SUCCESS;
+ }
}
return Status;
|