diff options
author | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2019-05-11 21:44:59 +0200 |
---|---|---|
committer | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2019-05-12 20:54:22 +0200 |
commit | 3b985113be63821c799ae6ee98690f740f49a0e9 (patch) | |
tree | 5962f273c5676c18024b7534bd6b13c7bd94f564 /lib | |
parent | 8ae39857b93edfe697c223fa2f2edfb39d45c98c (diff) | |
download | u-boot-3b985113be63821c799ae6ee98690f740f49a0e9.zip u-boot-3b985113be63821c799ae6ee98690f740f49a0e9.tar.gz u-boot-3b985113be63821c799ae6ee98690f740f49a0e9.tar.bz2 |
efi_loader: infinite recursion notifying events
UEFI SCT uses this call sequence to determine the current TPL level inside
notification functions:
OldTpl = BS->RaiseTPL(TPL_HIGH_LEVEL);
BS->RestoreTPL(OldTpl);
In RestoreTPL() we trigger the notification function of queued events. If
we do not mark the event as non-queued before calling the notification
function, this results in an infinite recursive call sequence.
Mark the event as non-queued before entering the notification function.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/efi_loader/efi_boottime.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c index b583ac6..ec6f575 100644 --- a/lib/efi_loader/efi_boottime.c +++ b/lib/efi_loader/efi_boottime.c @@ -181,10 +181,12 @@ static void efi_queue_event(struct efi_event *event, bool check_tpl) /* Check TPL */ if (check_tpl && efi_tpl >= event->notify_tpl) return; + event->is_queued = false; EFI_CALL_VOID(event->notify_function(event, event->notify_context)); + } else { + event->is_queued = false; } - event->is_queued = false; } /** |