Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp145744rwl; Thu, 30 Mar 2023 13:33:03 -0700 (PDT) X-Google-Smtp-Source: AKy350a4DzAjFA1L0CL2+hpgvJE2L5tx+KsX6gUZQWcHUmbgv/j252KeHX4iuBY4fw0g3Xq+JqoE X-Received: by 2002:a05:6402:4315:b0:502:616b:cbd5 with SMTP id m21-20020a056402431500b00502616bcbd5mr4055272edc.2.1680208382995; Thu, 30 Mar 2023 13:33:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680208382; cv=none; d=google.com; s=arc-20160816; b=sQ/PPqYcVmxd4WVXAuAZiVPkyupZ12Chp7cm72shd17BvA3rFTJazADibxk96E+qLe JV03EUNDCULCe40haEbriIyBucZVLz71aWvlxhCWyqls6OneNG2mg30Feyuxi3a+Neh6 EzFGSOxiobSHY8Sq4/nHcF4iNl6vYCHXq99r4QKhb3A+FRmArt13XP3yjg7MXxACMlfk LQfdjbT+NgIr3n/zZwTJYCgFR7Cl0kikDBXXU7Yh/QjIBUaPzJ8yjyrKD0QISfJHkNSf Xb0k/3YMe/dHWR3eP59bN/pDREfGFGAId8cC0XjKbkRAscG6sBDWhBz+l3Ub8mvT0KvW B15A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:subject:from:cc:to :in-reply-to:content-language:user-agent:mime-version:date :message-id:dkim-signature; bh=wK7GCYWOw+lG9q/p1ToXem8gzHNx+PH+yGZk1ens7jQ=; b=WaakNKMpkE6cU1/fF+hsVbV4vtZjnQHxDkWvkHBbSFU19nfdxYO3vO/pjUJbu0mSZM W23wBKAvWgLHIDSrBqtUPl7KYnIA9T5VIdrJyJAu8NQe7PjqCupcZEeamOXHHd1woJiq G/1Xd+dQ17ztHkAWlMkloBs4qkIU76dXLhkqnIEsTil1oion/FJ3RBdTkU+xvYt89QZR vSOFckM8cPJ/KmFydY8sG5NRrsPc9zfLdKPY7LpXZbjzygiuj9yhY8NS6D8HEuyf2QMg 9gGq8Cr8Qe2skAqNcN2sAJHBM3hugY19pfr1BkdiQqxrnd9Y4vRMgxVsfP0EobTEh6oO lA2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sberdevices.ru header.s=mail header.b=QPzKoVZ9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=sberdevices.ru Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id kk5-20020a170907766500b00930f5af3877si456385ejc.343.2023.03.30.13.32.38; Thu, 30 Mar 2023 13:33:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@sberdevices.ru header.s=mail header.b=QPzKoVZ9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=sberdevices.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229753AbjC3USY (ORCPT + 99 others); Thu, 30 Mar 2023 16:18:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55530 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229453AbjC3USW (ORCPT ); Thu, 30 Mar 2023 16:18:22 -0400 Received: from mx.sberdevices.ru (mx.sberdevices.ru [45.89.227.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5CB7940D3; Thu, 30 Mar 2023 13:18:21 -0700 (PDT) Received: from s-lin-edge02.sberdevices.ru (localhost [127.0.0.1]) by mx.sberdevices.ru (Postfix) with ESMTP id B2F405FD0B; Thu, 30 Mar 2023 23:18:19 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sberdevices.ru; s=mail; t=1680207499; bh=wK7GCYWOw+lG9q/p1ToXem8gzHNx+PH+yGZk1ens7jQ=; h=Message-ID:Date:MIME-Version:To:From:Subject:Content-Type; b=QPzKoVZ9fA7urps0wPlKOGy00Pox1UhqGRLngle5n+hxEwd3/Y2Bruk4YiCVYZEo3 hntATVDcyodP3gIihTdBra54u/5NSUYbr5hcqMPie6zwkCMuQrEu83DkPnP0Fc4tWX PYsJ+qRpa+B5mYRDSMp7qj4hais2c/Z3QPd0RFP3l7BLWac8KQg2G5+se3ivjynumx B6E8mCAwjDXjEbUUK2ukNq5kPo37VBWqJqEFhHWc8DcNB9hEZWWOJ1Uv50wdhbf0dn z32KlB7ln6q77Xz81FsCs8rMvNmAelZ0YJpp87QjLDHPzLqc4PUaTZlxS5IxFfdGO7 EJpqqhwi1I+Og== Received: from S-MS-EXCH01.sberdevices.ru (S-MS-EXCH01.sberdevices.ru [172.16.1.4]) by mx.sberdevices.ru (Postfix) with ESMTP; Thu, 30 Mar 2023 23:18:19 +0300 (MSK) Message-ID: Date: Thu, 30 Mar 2023 23:14:54 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Content-Language: en-US In-Reply-To: To: Stefan Hajnoczi , Stefano Garzarella , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Bobby Eshleman , Bryan Tan , Vishnu Dasa CC: , , , , , , , From: Arseniy Krasnov Subject: [RFC PATCH v3 3/4] vsock: return errors other than -ENOMEM to socket Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [172.16.1.6] X-ClientProxiedBy: S-MS-EXCH02.sberdevices.ru (172.16.1.5) To S-MS-EXCH01.sberdevices.ru (172.16.1.4) X-KSMG-Rule-ID: 4 X-KSMG-Message-Action: clean X-KSMG-AntiSpam-Status: not scanned, disabled by settings X-KSMG-AntiSpam-Interceptor-Info: not scanned X-KSMG-AntiPhishing: not scanned, disabled by settings X-KSMG-AntiVirus: Kaspersky Secure Mail Gateway, version 1.1.2.30, bases: 2023/03/30 18:07:00 #21069213 X-KSMG-AntiVirus-Status: Clean, skipped X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This removes behaviour, where error code returned from any transport was always switched to ENOMEM. This works in the same way as: commit c43170b7e157 ("vsock: return errors other than -ENOMEM to socket"), but for receive calls. Signed-off-by: Arseniy Krasnov --- net/vmw_vsock/af_vsock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c index 5f2dda35c980..413407bb646c 100644 --- a/net/vmw_vsock/af_vsock.c +++ b/net/vmw_vsock/af_vsock.c @@ -2043,7 +2043,7 @@ static int __vsock_stream_recvmsg(struct sock *sk, struct msghdr *msg, read = transport->stream_dequeue(vsk, msg, len - copied, flags); if (read < 0) { - err = -ENOMEM; + err = read; break; } @@ -2094,7 +2094,7 @@ static int __vsock_seqpacket_recvmsg(struct sock *sk, struct msghdr *msg, msg_len = transport->seqpacket_dequeue(vsk, msg, flags); if (msg_len < 0) { - err = -ENOMEM; + err = msg_len; goto out; } -- 2.25.1