mirror of
https://github.com/acidanthera/audk.git
synced 2025-04-08 17:05:09 +02:00
RedfishPkg/RedfishRestExDxe: fix CPU exception in RedfishRestExDxe
RedfishRestExDxe driver failed to uninstall service binding protocol when driver binding stop is called. Application drivers may still use RedfishRestExDxe after it is disconnected in system. Signed-off-by: Nickle Wang <nicklew@nvidia.com> Cc: Abner Chang <abner.chang@amd.com> Cc: Igor Kulchytskyy <igork@ami.com> Cc: Nick Ramirez <nramirez@nvidia.com> Reviewed-by: Abner Chang <abner.chang@amd.com>
This commit is contained in:
parent
af8859bce2
commit
98ab6e8718
@ -3,6 +3,7 @@
|
||||
|
||||
Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
|
||||
(C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR>
|
||||
Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
|
||||
SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
|
||||
@ -57,6 +58,7 @@ RestExDestroyChildEntryInHandleBuffer (
|
||||
ChildHandleBuffer = ((RESTEX_DESTROY_CHILD_IN_HANDLE_BUF_CONTEXT *)Context)->ChildHandleBuffer;
|
||||
|
||||
if (!NetIsInHandleBuffer (Instance->ChildHandle, NumberOfChildren, ChildHandleBuffer)) {
|
||||
RemoveEntryList (&Instance->Link);
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
@ -563,7 +565,7 @@ RedfishRestExDriverBindingStop (
|
||||
);
|
||||
}
|
||||
|
||||
if ((NumberOfChildren == 0) && IsListEmpty (&RestExSb->RestExChildrenList)) {
|
||||
if (IsListEmpty (&RestExSb->RestExChildrenList)) {
|
||||
gBS->UninstallProtocolInterface (
|
||||
NicHandle,
|
||||
&gEfiRestExServiceBindingProtocolGuid,
|
||||
|
Loading…
x
Reference in New Issue
Block a user