Re: [PATCH] s390/diag324: Preserve -EBUSY return code
Vasily Gorbik <[email protected]>
| Newsgroups | org.kernel.vger.linux-s390 |
|---|---|
| Message-ID | <[email protected]> |
On Tue, Aug 11, 2026 at 04:23:06PM +0200, Sumanth Korikkar wrote:
> 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: 90e6f191e1ee ("s390/diag324: Retrieve power readings via diag 0x324")
> Signed-off-by: Sumanth Korikkar <[email protected]>
> ---
> arch/s390/kernel/diag/diag324.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
Applied, thank you!