audk/MdeModulePkg
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
..
Application MdeModulePkg/BootManagerMenuApp: Limit string drawing within one line 2021-09-29 09:38:58 +08:00
Bus MdeModulePkg/Sd: Corrections for Extra.uni files 2021-10-14 00:13:17 +00:00
Core MdeModulePkg/Core/Dxe: Acquire a lock when iterating gHandleList 2021-10-14 03:27:20 +00:00
Include MdeModulePkg/PiSmmCore: Drop deprecated image profiling commands 2021-09-01 04:58:21 +00:00
Library MdeModulePkg/UefiSortLib:Add UefiSortLib unit test 2021-08-12 08:34:04 +00:00
Logo MdeModulePkg/Logo:Add RISCV64 architecture 2020-05-07 03:17:15 +00:00
Test MdeModulePkg/UefiSortLib:Add UefiSortLib unit test 2021-08-12 08:34:04 +00:00
Universal MdeModulePkg: Fix typo of "memory" in RamDiskDxe debug message 2021-09-03 03:10:30 +00:00
MdeModulePkg.ci.yaml MdeModulePkg: CI YAML: Added new GUID to ignore duplicate list 2021-09-30 01:47:50 +00:00
MdeModulePkg.dec MdeModulePkg: Add BootDiscoveryPolicyUiLib. 2021-08-03 04:59:12 +00:00
MdeModulePkg.dsc MdeModulePkg: Add BootDiscoveryPolicyUiLib. 2021-08-03 04:59:12 +00:00
MdeModulePkg.uni MdeModulePkg: Fix various typos 2021-05-17 02:10:31 +00:00
MdeModulePkgExtra.uni MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00