Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp360022rdg; Tue, 10 Oct 2023 12:23:41 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHgtHQSNI5jO8xSiOgGau/n8Oo6HzPST+0VA59Z6wTbcPt1sk8cPeGhdj5HA8ID5ry4wV++ X-Received: by 2002:a17:90b:3e8d:b0:277:68c3:64b9 with SMTP id rj13-20020a17090b3e8d00b0027768c364b9mr22437769pjb.5.1696965820173; Tue, 10 Oct 2023 12:23:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696965820; cv=none; d=google.com; s=arc-20160816; b=tt6WW8g4HvF+tOcYlhxVDpDbkbZuH9dHJNokZkdkZx7noPJAFLdEUl5UFn9IB71ivO 542zp+jf5SOSVqh/PWtVW10p2M35KtBPITe+9WvGYovYadS6s4cH5B85vbcex5Cx5FMj i/Ipy/boxEm+Vwh1N6fiC6lr+flwHXjXumkt7/8NFe2YXtnDdjtkU6OZIzlmyi3lLLaa LOybbYnj0IH3+WQdzh6GCLOErnVqwqO3VzzRmsam3f49UeX8aCwKO2LdzNq7M+CrLJ9w L9kjM69iYj0ZEmjhFjLur/3WwE4QrBXvPOMUJlCs81FZPuXGk6DaA4CxvqzpPSNllLb0 i+AQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter; bh=J/gSQvoC54wwOay2Fyo/U/lq9WCB0om5hPzpv13lVUQ=; fh=wIHqZpOIuzcidDZ82yQbOZuyHJty7uvaWDEh/efoVzA=; b=muEgaT4+YoAlrrEKew3mzSUJZvY9Nf1gnAvpAsDFP2b8LFSiQG0o2QAymtQmnVJExX joFUHWklIdnMT7myUEykvMYth7gL6NFDNvozccmIwZ0Hz4N86gx+ghrAEdzB8z7nrsvX az+xtxIEi08nDVVWtKLVpnUK78nouHTAWWwCO+sgQ9VvCmWi2JTUdBizIG0IVl4cY+Pu Gj7B4LpDLRMwgydtIyr6cP77Avgo8FX607xxagskSQWB6wQAsF2cnX5sbvrql1DgkwvC z/jYe8cEbwYWBU5xUkYtzxRAWHcsZEwul9q4YCsC9COIWvI+A7hPl56ZwNGxz9S5k5Gl 35Xg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@salutedevices.com header.s=mail header.b=M2KLOTMR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=salutedevices.com Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id c5-20020a6566c5000000b00578b93b1b26si12700018pgw.544.2023.10.10.12.23.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Oct 2023 12:23:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@salutedevices.com header.s=mail header.b=M2KLOTMR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=salutedevices.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 1C2BA821DB3C; Tue, 10 Oct 2023 12:23:36 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343969AbjJJTXO (ORCPT + 99 others); Tue, 10 Oct 2023 15:23:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52298 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234372AbjJJTXA (ORCPT ); Tue, 10 Oct 2023 15:23:00 -0400 Received: from mx1.sberdevices.ru (mx2.sberdevices.ru [45.89.224.132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1D2BE124; Tue, 10 Oct 2023 12:22:48 -0700 (PDT) Received: from p-infra-ksmg-sc-msk02 (localhost [127.0.0.1]) by mx1.sberdevices.ru (Postfix) with ESMTP id 57943120002; Tue, 10 Oct 2023 22:22:45 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.sberdevices.ru 57943120002 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=salutedevices.com; s=mail; t=1696965765; bh=J/gSQvoC54wwOay2Fyo/U/lq9WCB0om5hPzpv13lVUQ=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type:From; b=M2KLOTMRl9OpNGMsHlKLhvuBuovI1t0k4sNtM313Uzfeec9nS35vHCvNgRpr7KD5U /LHXPDtKD+KZKoQmTP+/rJA8tQbeFnqBAl6NsJBNRYqw20yCxJl9/Yq/Y55DaaSHCy 9kndkH//Hf7rjzu08OaCBdmE/itpDokVxGgb9R4XsYWkleA+yk+HfJekSNJwxL51H+ 1IJqurXIzobZOLelgn+X642uV9DynVSDLh23yCA06qJO+hNHLIC33Etw9HTsFJkQGb Kbx+1xWN7Qk6+TLx5MYx8YiHwjy8PtWCtgPGnEWIXYFhHNH4yu088r8R99bgHOlIFM DApqFxOSaUW+g== Received: from p-i-exch-sc-m01.sberdevices.ru (p-i-exch-sc-m01.sberdevices.ru [172.16.192.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.sberdevices.ru (Postfix) with ESMTPS; Tue, 10 Oct 2023 22:22:45 +0300 (MSK) Received: from localhost.localdomain (100.64.160.123) by p-i-exch-sc-m01.sberdevices.ru (172.16.192.107) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.30; Tue, 10 Oct 2023 22:22:44 +0300 From: Arseniy Krasnov To: Stefan Hajnoczi , Stefano Garzarella , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , "Michael S. Tsirkin" , Jason Wang , Bobby Eshleman CC: , , , , , , Subject: [PATCH net-next v4 01/12] vsock: set EPOLLERR on non-empty error queue Date: Tue, 10 Oct 2023 22:15:13 +0300 Message-ID: <20231010191524.1694217-2-avkrasnov@salutedevices.com> X-Mailer: git-send-email 2.35.0 In-Reply-To: <20231010191524.1694217-1-avkrasnov@salutedevices.com> References: <20231010191524.1694217-1-avkrasnov@salutedevices.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [100.64.160.123] X-ClientProxiedBy: p-i-exch-sc-m02.sberdevices.ru (172.16.192.103) To p-i-exch-sc-m01.sberdevices.ru (172.16.192.107) X-KSMG-Rule-ID: 10 X-KSMG-Message-Action: clean X-KSMG-AntiSpam-Lua-Profiles: 180515 [Oct 10 2023] X-KSMG-AntiSpam-Version: 6.0.0.2 X-KSMG-AntiSpam-Envelope-From: avkrasnov@salutedevices.com X-KSMG-AntiSpam-Rate: 0 X-KSMG-AntiSpam-Status: not_detected X-KSMG-AntiSpam-Method: none X-KSMG-AntiSpam-Auth: dkim=none X-KSMG-AntiSpam-Info: LuaCore: 536 536 1ae19c7800f69da91432b5e67ed4a00b9ade0d03, {Tracking_from_domain_doesnt_match_to}, 100.64.160.123:7.1.2;d41d8cd98f00b204e9800998ecf8427e.com:7.1.1;p-i-exch-sc-m01.sberdevices.ru:5.0.1,7.1.1;127.0.0.199:7.1.2;salutedevices.com:7.1.1, FromAlignment: s, ApMailHostAddress: 100.64.160.123 X-MS-Exchange-Organization-SCL: -1 X-KSMG-AntiSpam-Interceptor-Info: scan successful X-KSMG-AntiPhishing: Clean X-KSMG-LinksScanning: Clean X-KSMG-AntiVirus: Kaspersky Secure Mail Gateway, version 2.0.1.6960, bases: 2023/10/10 16:15:00 #22148151 X-KSMG-AntiVirus-Status: Clean, skipped X-Spam-Status: No, score=2.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Tue, 10 Oct 2023 12:23:36 -0700 (PDT) X-Spam-Level: ** If socket's error queue is not empty, EPOLLERR must be set. Otherwise, reader of error queue won't detect data in it using EPOLLERR bit. Currently for AF_VSOCK this is actual only with MSG_ZEROCOPY, as this feature is the only user of an error queue of the socket. Signed-off-by: Arseniy Krasnov Reviewed-by: Stefano Garzarella --- net/vmw_vsock/af_vsock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c index 013b65241b65..d841f4de33b0 100644 --- a/net/vmw_vsock/af_vsock.c +++ b/net/vmw_vsock/af_vsock.c @@ -1030,7 +1030,7 @@ static __poll_t vsock_poll(struct file *file, struct socket *sock, poll_wait(file, sk_sleep(sk), wait); mask = 0; - if (sk->sk_err) + if (sk->sk_err || !skb_queue_empty_lockless(&sk->sk_error_queue)) /* Signify that there has been an error on this socket. */ mask |= EPOLLERR; -- 2.25.1