From: Ivan Hu Date: Mon, 31 Mar 2025 07:45:04 +0000 (+0800) Subject: efi/efi_test: Fix missing pending status update in getwakeuptime X-Git-Tag: v6.16-rc1~107^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3dcb524d785373fd43b129f01f32bd394fe167e0;p=thirdparty%2Fkernel%2Flinux.git 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 Signed-off-by: Ard Biesheuvel --- diff --git a/drivers/firmware/efi/test/efi_test.c b/drivers/firmware/efi/test/efi_test.c index 9e2628728aadc..77b5f7ac3e20c 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)))