efi/efi_test: Fix missing pending status update in getwakeuptime

The pending status was not being passed to user space, leading to
false test alarms when using the pending status. This patch ensures
that the pending status is correctly updated and exposed to user space
when calling getwakeuptime, preventing incorrect handling of the pending
status.

Signed-off-by: Ivan Hu <ivan.hu@canonical.com>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
This commit is contained in:
Ivan Hu 2025-03-31 15:45:04 +08:00 committed by Ard Biesheuvel
parent 857faddd16
commit 3dcb524d78

View file

@ -361,6 +361,10 @@ static long efi_runtime_get_waketime(unsigned long arg)
getwakeuptime.enabled))
return -EFAULT;
if (getwakeuptime.pending && put_user(pending,
getwakeuptime.pending))
return -EFAULT;
if (getwakeuptime.time) {
if (copy_to_user(getwakeuptime.time, &efi_time,
sizeof(efi_time_t)))