Linux s390 Architecture development
 help / color / mirror / Atom feed
From: Heiko Carstens <hca@linux.ibm.com>
To: Sumanth Korikkar <sumanthk@linux.ibm.com>
Cc: linux-s390 <linux-s390@vger.kernel.org>,
	Vasily Gorbik <gor@linux.ibm.com>,
	Alexander Gordeev <agordeev@linux.ibm.com>,
	Ilya Leoshkevich <iii@linux.ibm.com>,
	Christian Borntraeger <borntraeger@linux.ibm.com>
Subject: Re: [PATCH] s390/diag324: Preserve -EBUSY return code
Date: Tue, 11 Aug 2026 16:57:46 +0200	[thread overview]
Message-ID: <20260811145746.12308F67-hca@linux.ibm.com> (raw)
In-Reply-To: <20260811142306.4032721-1-sumanthk@linux.ibm.com>

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 <sumanthk@linux.ibm.com>
> ---
>  arch/s390/kernel/diag/diag324.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)

Reviewed-by: Heiko Carstens <hca@linux.ibm.com>

      reply	other threads:[~2026-08-11 14:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-11 14:23 [PATCH] s390/diag324: Preserve -EBUSY return code Sumanth Korikkar
2026-08-11 14:57 ` Heiko Carstens [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260811145746.12308F67-hca@linux.ibm.com \
    --to=hca@linux.ibm.com \
    --cc=agordeev@linux.ibm.com \
    --cc=borntraeger@linux.ibm.com \
    --cc=gor@linux.ibm.com \
    --cc=iii@linux.ibm.com \
    --cc=linux-s390@vger.kernel.org \
    --cc=sumanthk@linux.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox