On 11/10/2021 11:45, Ma, Hua wrote:
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.
Locking the list when iterating can fix this issue.
At a first glance, it looks as though if the caller does not already
hold the lock, then the result from CoreValidateHandle() may be invalid
by the time that control returns to the caller.
Under what circumstances is it valid to call CoreValidateHandle() when
the caller does not _already_ hold the lock (i.e. IsLocked==FALSE)?
Thanks,
Michael
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#81748): https://edk2.groups.io/g/devel/message/81748
Mute This Topic: https://groups.io/mt/86233569/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-