Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1727032rwl; Thu, 30 Mar 2023 00:13:15 -0700 (PDT) X-Google-Smtp-Source: AKy350aNp3sbwmMtt7emL/ZLSAwG8cqYe3AGTZC6XpTRe+2eRMZ1cimr8KCbSS9JpMkihqKYG1Bs X-Received: by 2002:a05:6402:40d6:b0:502:367:d5b8 with SMTP id z22-20020a05640240d600b005020367d5b8mr1675287edb.4.1680160395383; Thu, 30 Mar 2023 00:13:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680160395; cv=none; d=google.com; s=arc-20160816; b=oH8Cr3FZefWZw39kF78LxhYHcW4U1YVh2xjPFuXcN0olVIaAshrwCS9VeTnOpMZhzq mr0o2MukHlm0t+8RIS5uieHnfBX/htAwU4Fh0Os1LUbhL2TT8+gD9Lc/5TELKGB3uMl2 Sftxcs0Clc755NNHWu/3ApD/3wn9sswhLkMOAlpBhOh1chP9w/HDoEl9pCXFW4nWqQyc B25zz5aNEcFrIaf5SNPXekCRpe9bqDQEKbXJ3/Au0dZ7ZSWBR/kYTm86Sa6NPaTpUVAX 6IaFkibUySxFs5M0TJBUxMOmVTBGDhhyRxFaprRaB/RPeSqrqqf7JcQp4NjAg5RdlSmj pxRg== 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=NlLWW81rCyUZS2NXZJDJF9/GTkcB8rLOaHPOrPpt98ylA2XK+LJ/eQk43EaYXKnWnE mYNEX/Nyb6n+jtwsIfiuwPAcXNzeD7WdNubDLhWoRRdHkIRO6S5tsx0FHDflrzG2X3TI BbdoTPSkIWF0TolyKdJkAb5g5cFTmgCNLGkTDd91XK7EDsbK+3IIAIhrE5Sc6EGFHTdG AoTNEsH0MeDYrdIINLYc6QV1EQNPoXYd3bTNzTPxclsnv2+ohoAH/chu8cFb9HyNyYJl rZTOddXcsH5GzxRoz3N/a35jQTlq6nt7vwjFFZuMIDm/aIpL2nSrgmvTgtpCSI26W2Yu NuiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sberdevices.ru header.s=mail header.b=VVKgPd2A; 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 w22-20020a056402129600b004fb5244aa5fsi34628419edv.123.2023.03.30.00.12.50; Thu, 30 Mar 2023 00:13:15 -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=VVKgPd2A; 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 S230183AbjC3HJO (ORCPT + 99 others); Thu, 30 Mar 2023 03:09:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36904 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229640AbjC3HJM (ORCPT ); Thu, 30 Mar 2023 03:09:12 -0400 Received: from mx.sberdevices.ru (mx.sberdevices.ru [45.89.227.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A8F652683; Thu, 30 Mar 2023 00:09:10 -0700 (PDT) Received: from s-lin-edge02.sberdevices.ru (localhost [127.0.0.1]) by mx.sberdevices.ru (Postfix) with ESMTP id 01D9E5FD25; Thu, 30 Mar 2023 10:09:09 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sberdevices.ru; s=mail; t=1680160149; bh=wK7GCYWOw+lG9q/p1ToXem8gzHNx+PH+yGZk1ens7jQ=; h=Message-ID:Date:MIME-Version:To:From:Subject:Content-Type; b=VVKgPd2AY8ifTLVP7yz7hKZ9V2P668QZRPGkv+dHfSh2CJr+Tccr+gwCfa5Bd+vVH 1GD73UM4EEZvfRdubWXVW6hMWV2dXWijONQCqgb18STJ245RG3gKu0UPuyN2u6mJyr FbJ1itQszu2ZChMnNq0UfLA1nlx2BtTgSWvFB9m4cY8HoqFF2Yc0kM/3x3tTBJ3YF0 8XO5/Tq8a+bYvGhGX6HcfaqSLCtgC/lKFvQizMZHVVdLgHflAAiVdL9Wemj68swZA4 3PcsAlyoH2o2OlwGEKCZQcesrE3TPxHR8lCEPih/4aNBlhCLsFJeIdvu3dheIxaq7h +J3K0uLxfS2CA== 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 10:09:08 +0300 (MSK) Message-ID: Date: Thu, 30 Mar 2023 10:05:45 +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: <60abc0da-0412-6e25-eeb0-8e32e3ec21e7@sberdevices.ru> 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 v2 1/3] 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-EXCH01.sberdevices.ru (172.16.1.4) 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 01:24:00 #21043458 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