audk/MdeModulePkg/Core/Dxe
Hua Ma a7fcab7aa3 MdeModulePkg/Core/Dxe: Acquire a lock when iterating gHandleList
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3680

This patch fixes the following issue:

The global variable gHandleList is a linked list.
This list is locked when a entry is added or removed from the list,
but there is no lock when iterating this list in function
CoreValidateHandle().
It can lead to "Handle.c (76): CR has Bad Signature" assertion if the
iterated entry in the list is just removed by other task during iterating.

Currently some caller functions of CoreValidateHandle() have
CoreAcquireProtocolLock(), but some caller functions of
CoreValidateHandle() do not CoreAcquireProtocolLock().
Add CoreAcquireProtocolLock() always when CoreValidateHandle() is called,
Also, A lock check is added in the CoreValidateHandle().

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Dandan Bi <dandan.bi@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Signed-off-by: Hua Ma <hua.ma@intel.com>
Reviewed-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
2021-10-14 03:27:20 +00:00
..
Dispatcher MdeModulePkg DxeCore: Fix typo in function name 2019-10-17 09:09:02 +08:00
DxeMain MdeModulePkg/Core/Dxe: log memory base and length, after lib ctors again 2020-11-06 20:37:22 +00:00
Event MdeModulePkg: document workaround for EFI_RUNTIME_EVENT_ENTRY PI spec bug 2019-10-09 09:40:09 +02:00
FwVol MdeModulePkg/Core: Support standalone MM in FV2 protocol GetNextFile(). 2020-10-29 05:29:42 +00:00
FwVolBlock MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
Gcd MdeModulePkg/Gcd: Check memory allocation when initializing memory 2020-11-05 03:37:37 +00:00
Hand MdeModulePkg/Core/Dxe: Acquire a lock when iterating gHandleList 2021-10-14 03:27:20 +00:00
Image MdeModulePkg: Fix various typos 2021-05-17 02:10:31 +00:00
Library MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
Mem MdeModulePkg/Core/Dxe: expose SP and CRYPTO capabilities in UEFI memmap 2020-10-10 04:04:50 +00:00
Misc MdeModulePkg: Add New Memory Attributes 2020-07-15 14:58:25 +00:00
SectionExtraction MdeModulePkg/Core/Dxe: limit FwVol encapsulation section recursion 2020-11-21 01:40:53 +00:00
DxeCore.uni MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
DxeCoreExtra.uni MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
DxeMain.h MdeModulePkg/DxeCore: merge properties table routines into MAT handling 2020-04-07 08:15:46 +00:00
DxeMain.inf MdeModulePkg/Core/Dxe: limit FwVol encapsulation section recursion 2020-11-21 01:40:53 +00:00