From: Cornelia Huck <cohuck@redhat.com>
To: Zheng Yongjun <zhengyongjun3@huawei.com>
Cc: kvm@vger.kernel.org, linux-s390@vger.kernel.org,
linux-kernel@vger.kernel.org, borntraeger@de.ibm.com,
frankja@linux.ibm.com, david@redhat.com, imbrenda@linux.ibm.com,
hca@linux.ibm.com, gor@linux.ibm.com
Subject: Re: [PATCH -next] KVM: s390: Return the correct errno code
Date: Thu, 4 Feb 2021 09:32:27 +0100 [thread overview]
Message-ID: <20210204093227.3f088c8a.cohuck@redhat.com> (raw)
In-Reply-To: <20210204080523.18943-1-zhengyongjun3@huawei.com>
On Thu, 4 Feb 2021 16:05:23 +0800
Zheng Yongjun <zhengyongjun3@huawei.com> wrote:
> When valloc failed, should return ENOMEM rather than ENOBUF.
>
> Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
> ---
> arch/s390/kvm/interrupt.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/s390/kvm/interrupt.c b/arch/s390/kvm/interrupt.c
> index 2f177298c663..6b7acc27cfa2 100644
> --- a/arch/s390/kvm/interrupt.c
> +++ b/arch/s390/kvm/interrupt.c
> @@ -2252,7 +2252,7 @@ static int get_all_floating_irqs(struct kvm *kvm, u8 __user *usrbuf, u64 len)
> */
> buf = vzalloc(len);
> if (!buf)
> - return -ENOBUFS;
> + return -ENOMEM;
>
> max_irqs = len / sizeof(struct kvm_s390_irq);
>
This breaks a user space interface (see the comment right above the
vzalloc).
WARNING: multiple messages have this Message-ID (diff)
From: Cornelia Huck <cohuck@redhat.com>
To: Zheng Yongjun <zhengyongjun3@huawei.com>
Cc: <kvm@vger.kernel.org>, <linux-s390@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <borntraeger@de.ibm.com>,
<frankja@linux.ibm.com>, <david@redhat.com>,
<imbrenda@linux.ibm.com>, <hca@linux.ibm.com>,
<gor@linux.ibm.com>
Subject: Re: [PATCH -next] KVM: s390: Return the correct errno code
Date: Thu, 4 Feb 2021 09:32:27 +0100 [thread overview]
Message-ID: <20210204093227.3f088c8a.cohuck@redhat.com> (raw)
Message-ID: <20210204083227.SiLGWdwMVS5XYFn9yr8G-35JRl0RJWqyjdg4oKOUfwY@z> (raw)
In-Reply-To: <20210204080523.18943-1-zhengyongjun3@huawei.com>
On Thu, 4 Feb 2021 16:05:23 +0800
Zheng Yongjun <zhengyongjun3@huawei.com> wrote:
> When valloc failed, should return ENOMEM rather than ENOBUF.
>
> Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
> ---
> arch/s390/kvm/interrupt.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/s390/kvm/interrupt.c b/arch/s390/kvm/interrupt.c
> index 2f177298c663..6b7acc27cfa2 100644
> --- a/arch/s390/kvm/interrupt.c
> +++ b/arch/s390/kvm/interrupt.c
> @@ -2252,7 +2252,7 @@ static int get_all_floating_irqs(struct kvm *kvm, u8 __user *usrbuf, u64 len)
> */
> buf = vzalloc(len);
> if (!buf)
> - return -ENOBUFS;
> + return -ENOMEM;
>
> max_irqs = len / sizeof(struct kvm_s390_irq);
>
This breaks a user space interface (see the comment right above the
vzalloc).
next prev parent reply other threads:[~2021-02-04 8:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-04 8:05 [PATCH -next] KVM: s390: Return the correct errno code Zheng Yongjun
2021-02-04 8:05 ` Zheng Yongjun
2021-02-04 8:32 ` Cornelia Huck [this message]
2021-02-04 8:32 ` Cornelia Huck
2021-02-04 8:42 ` Christian Borntraeger
2021-02-04 9:04 ` 答复: " zhengyongjun
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=20210204093227.3f088c8a.cohuck@redhat.com \
--to=cohuck@redhat.com \
--cc=borntraeger@de.ibm.com \
--cc=david@redhat.com \
--cc=frankja@linux.ibm.com \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=imbrenda@linux.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=zhengyongjun3@huawei.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