Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1520764pxb; Thu, 4 Feb 2021 15:32:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJxIlR/EIz1fbxTx6lsj/dhhwIQYiA6DFP+uii4EsMieuQNjhswgkz5BI7g9AYZDXPgSoBdm X-Received: by 2002:a05:6402:3122:: with SMTP id dd2mr939152edb.262.1612481562432; Thu, 04 Feb 2021 15:32:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612481562; cv=none; d=google.com; s=arc-20160816; b=qQK2gMeUH6FS1iS56+eSeG3tEr+ie7T5KXGp8MdK1cs7Dyaa0vQ2By8rHyR9Zb0d5P 8atj0+La66gx85nacicqrwBiauh4LpVcGw0z961njLyMvceIzgCpjhM6fr2eFMZTlSRt p8cUEC4pEwYYqTRsLq2QREfNOe9B7gLhqUq2FQQ2sTQly/xdnpN64Xxr4hyYlyn5JCyA xFdHFUwueISembPbdHyX1Wd3Dz77iG27FC+MzuLORDrWGs1nEFMZLebqsFtSZbcWERo1 44Hi5HZJKlLo37jzP/vmWpgPKEUpZqEn85+MX9bVxyQj0NZEBoIDEC5SpyR8SdN5S929 NM3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date:dkim-signature; bh=K5a/vTcjLzOjEP+uctbeny3ZIbf8QS7zvppeT9pC6J4=; b=eFmp/Uno03Z8+yCKl8j921cYearBFo/cZ7ZEcnK4Ika15r/LIZFJIehkJGTYsRMvYz Z/7cugpMrn9mE3alkG5Bpap6jWC4Lc6g7hZEuk9Gh+yVdvqJqaF5u0Z+MWk62v8NS9i6 I9aJbEJJzVmbAKjhlOsdzJDKRpkqc3hHPWyqTQLhy3ZYUtweR9+Q4BL35P+eAQsswpQA L0ZSozPL5u20iQNO6uiEAbOxbidrFdjplsBuaHdz8C5p775Kbt8CLMouhyNCM9tOpfKM WboBX4IB4161bwWqIj5fOp2qEX9xWoHLiIgS6KZy0UduqCZmY0fmtdFHCmho0DNFAWxt vBrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=MM4LH8Yd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gs5si3972358ejb.491.2021.02.04.15.32.18; Thu, 04 Feb 2021 15:32:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=MM4LH8Yd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234973AbhBDIeM (ORCPT + 99 others); Thu, 4 Feb 2021 03:34:12 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:43082 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234935AbhBDIeE (ORCPT ); Thu, 4 Feb 2021 03:34:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612427558; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=K5a/vTcjLzOjEP+uctbeny3ZIbf8QS7zvppeT9pC6J4=; b=MM4LH8YdOehSsheed4/fYyuQtmaDZ9Taz/g9azei0b3vUSBx9UnFJLvnfkYMFOAkaAp+bC 1x0AYlegAkJBYcrQdSRaafuoHnQFdUpvjPpNtWZyyQYN7VpDe6+I330UnHeQPL4hRRAEUj n6/W4KVtU4EaMxVtjNuuWvphdrMjgAk= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-39-JJJZ8yjsN9yydDpelZ4wdg-1; Thu, 04 Feb 2021 03:32:36 -0500 X-MC-Unique: JJJZ8yjsN9yydDpelZ4wdg-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1C5C3192CC4C; Thu, 4 Feb 2021 08:32:35 +0000 (UTC) Received: from gondolin (ovpn-113-130.ams2.redhat.com [10.36.113.130]) by smtp.corp.redhat.com (Postfix) with ESMTP id EFC5010013C1; Thu, 4 Feb 2021 08:32:29 +0000 (UTC) Date: Thu, 4 Feb 2021 09:32:27 +0100 From: Cornelia Huck To: Zheng Yongjun Cc: , , , , , , , , Subject: Re: [PATCH -next] KVM: s390: Return the correct errno code Message-ID: <20210204093227.3f088c8a.cohuck@redhat.com> In-Reply-To: <20210204080523.18943-1-zhengyongjun3@huawei.com> References: <20210204080523.18943-1-zhengyongjun3@huawei.com> Organization: Red Hat GmbH MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 4 Feb 2021 16:05:23 +0800 Zheng Yongjun wrote: > When valloc failed, should return ENOMEM rather than ENOBUF. > > Signed-off-by: Zheng Yongjun > --- > 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).