summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Hu <ivan.hu@canonical.com>2025-03-31 10:45:04 +0300
committerArd Biesheuvel <ardb@kernel.org>2025-05-21 16:39:30 +0300
commit3dcb524d785373fd43b129f01f32bd394fe167e0 (patch)
tree762a206b177f5bd48fb9ffb781cb7543f35b9f3c
parent857faddd16c52b267da6519ba03d4578046f056f (diff)
downloadlinux-3dcb524d785373fd43b129f01f32bd394fe167e0.tar.xz
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>
-rw-r--r--drivers/firmware/efi/test/efi_test.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/firmware/efi/test/efi_test.c b/drivers/firmware/efi/test/efi_test.c
index 9e2628728aad..77b5f7ac3e20 100644
--- a/drivers/firmware/efi/test/efi_test.c
+++ b/drivers/firmware/efi/test/efi_test.c
@@ -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)))