Skip to content

Commit 3dcb524

Browse files
Ivanhu5866ardbiesheuvel
authored andcommitted
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>
1 parent 857fadd commit 3dcb524

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/firmware/efi/test/efi_test.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,10 @@ static long efi_runtime_get_waketime(unsigned long arg)
361361
getwakeuptime.enabled))
362362
return -EFAULT;
363363

364+
if (getwakeuptime.pending && put_user(pending,
365+
getwakeuptime.pending))
366+
return -EFAULT;
367+
364368
if (getwakeuptime.time) {
365369
if (copy_to_user(getwakeuptime.time, &efi_time,
366370
sizeof(efi_time_t)))

0 commit comments

Comments
 (0)