diff options
author | Hua Ma <hua.ma@intel.com> | 2021-10-11 11:43:12 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2021-10-14 03:27:20 +0000 |
commit | a7fcab7aa3de338c02e61fd891610b1ec926e6c8 (patch) | |
tree | 0261648b189bb84aef7e0d6efc70f13d37e2e958 /ArmVirtPkg/ArmVirtXen.fdf | |
parent | 43b38408732b6c11641300689e09df1ad7bdcc6a (diff) | |
download | edk2-a7fcab7aa3de338c02e61fd891610b1ec926e6c8.tar.gz edk2-a7fcab7aa3de338c02e61fd891610b1ec926e6c8.tar.bz2 edk2-a7fcab7aa3de338c02e61fd891610b1ec926e6c8.zip |
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>
Diffstat (limited to 'ArmVirtPkg/ArmVirtXen.fdf')
0 files changed, 0 insertions, 0 deletions