lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <e6926214bd4048ec93f9ad13f83205d3@huawei.com>
Date:   Thu, 4 Feb 2021 09:04:53 +0000
From:   zhengyongjun <zhengyongjun3@...wei.com>
To:     Christian Borntraeger <borntraeger@...ibm.com>,
        Cornelia Huck <cohuck@...hat.com>
CC:     "kvm@...r.kernel.org" <kvm@...r.kernel.org>,
        "linux-s390@...r.kernel.org" <linux-s390@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "frankja@...ux.ibm.com" <frankja@...ux.ibm.com>,
        "david@...hat.com" <david@...hat.com>,
        "imbrenda@...ux.ibm.com" <imbrenda@...ux.ibm.com>,
        "hca@...ux.ibm.com" <hca@...ux.ibm.com>,
        "gor@...ux.ibm.com" <gor@...ux.ibm.com>
Subject: 答复: [PATCH -next] KVM: s390: Return the correct errno code

Thanks for your advice, I will do this better later :)

-----邮件原件-----
发件人: Christian Borntraeger [mailto:borntraeger@...ibm.com] 
发送时间: 2021年2月4日 16:42
收件人: Cornelia Huck <cohuck@...hat.com>; zhengyongjun <zhengyongjun3@...wei.com>
抄送: kvm@...r.kernel.org; linux-s390@...r.kernel.org; linux-kernel@...r.kernel.org; frankja@...ux.ibm.com; david@...hat.com; imbrenda@...ux.ibm.com; hca@...ux.ibm.com; gor@...ux.ibm.com
主题: Re: [PATCH -next] KVM: s390: Return the correct errno code

On 04.02.21 09:32, Cornelia Huck wrote:
> On Thu, 4 Feb 2021 16:05:23 +0800
> Zheng Yongjun <zhengyongjun3@...wei.com> wrote:
> 
>> When valloc failed, should return ENOMEM rather than ENOBUF.
>>
>> Signed-off-by: Zheng Yongjun <zhengyongjun3@...wei.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).


Right. Please do not send (generated?) patches without looking at the code that you are patching.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ