linux/arch/s390/kernel/diag
Sumanth Korikkar 439077c39d s390/diag324: Preserve -EBUSY return code
When diag324 reports -EBUSY, the error code is
overwritten by the result of copy_to_user() and put_user(). As a result,
the ioctl may incorrectly return success instead of -EBUSY.

Preserve the original diag324 return code and only return -EFAULT when
copying data to userspace fails.

Fixes: 90e6f191e1 ("s390/diag324: Retrieve power readings via diag 0x324")
Signed-off-by: Sumanth Korikkar <sumanthk@linux.ibm.com>
Reviewed-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
2026-08-31 16:25:39 +02:00
..
diag_ioctl.h s390/diag: Add memory topology information via diag310 2025-01-15 13:59:08 +01:00
diag_misc.c s390/diag: Add memory topology information via diag310 2025-01-15 13:59:08 +01:00
diag.c s390: Use inline qualifier for all EX_TABLE and ALTERNATIVE inline assemblies 2025-03-18 17:13:51 +01:00
diag310.c s390/diag: Add missing array_index_nospec() call to memtop_get_page_count() 2026-07-08 17:02:47 +02:00
diag324.c s390/diag324: Preserve -EBUSY return code 2026-08-31 16:25:39 +02:00
Makefile s390/diag: Add memory topology information via diag310 2025-01-15 13:59:08 +01:00