Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp1072964rdb; Sat, 7 Oct 2023 10:29:42 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG2DOFBwahoV9cx9/uSEdoT6kQysM+o8s8ZOD4DOJJqzdLV1D2EQQwxTD6+uDXBjrfgMrwR X-Received: by 2002:a17:90a:a406:b0:276:7e50:a497 with SMTP id y6-20020a17090aa40600b002767e50a497mr9681708pjp.42.1696699782378; Sat, 07 Oct 2023 10:29:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696699782; cv=none; d=google.com; s=arc-20160816; b=yF+S878WKsPOG4fJyDgD9Jqq5eMtceiszXpdR10ozwGSiQEG7IR2NJeITWUgqUUmzz EfvRzq4VsMT43TaVHEzKwscXsPJQmvW9ww3ncoRX3E4AHlnabwp/LUysZbeiba4L7Hex DtHOkFRB3JxeZZF/5IokSAEtONA3etOwDEdj/D+YdiIEX0tB1Z8QktGsio6rMQUs/sKs b8uVdkWGfwl5oU0OWVyX405oUwqBiN4u6mDpurNnoo5F1AXDGlzVTrtTOiD2UZoIgxjq 9Vh9lxa5OFIUnyuArIwVXnAatx5jX7ormu//8z12AXVN+wBCCz9rP+pveu/QZGksBhhV n/gQ== 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=XEx4OG0hNq+NdwUT9YFMI8nP9p1Us0cVPbxlT4L+D29SKx9ZpIGF26l44NSrN6jDVw T+NKZvnIWwdne2O8T17rSGG2Wv+Qep3qMe7hENfFvMY7LmEAgzJSkl57Bmjk+okEw9D0 Q9yN3CJX2qA21zb2wZvKT5MV65s9EVw4u5Ke7YnDG2o7f+T1Ier3D4i0UtRu+vtd3p/B SS5k5uDEshCEM7ToP+zRocfPw5yMPmJI3jHm3roKYve2IujaFjZSKqpYnSGJEblXovT3 BWcMqe1wr44KJQDi/xjAK4RCFbNt5iL/w/aHFduGkO9EpDv5i7xQKCmJvFUPEzxIkUpO vtTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@salutedevices.com header.s=mail header.b=qRVb9wcb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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 fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id u18-20020a17090abb1200b002792c288cb7si8140023pjr.131.2023.10.07.10.29.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 07 Oct 2023 10:29:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@salutedevices.com header.s=mail header.b=qRVb9wcb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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 fry.vger.email (Postfix) with ESMTP id 80A0A8040DE4; Sat, 7 Oct 2023 10:29:31 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344152AbjJGR25 (ORCPT + 99 others); Sat, 7 Oct 2023 13:28:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34470 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344075AbjJGR2v (ORCPT ); Sat, 7 Oct 2023 13:28:51 -0400 Received: from mx1.sberdevices.ru (mx2.sberdevices.ru [45.89.224.132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2578C9C; Sat, 7 Oct 2023 10:28:49 -0700 (PDT) Received: from p-infra-ksmg-sc-msk02 (localhost [127.0.0.1]) by mx1.sberdevices.ru (Postfix) with ESMTP id B5569120005; Sat, 7 Oct 2023 20:28:46 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.sberdevices.ru B5569120005 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=salutedevices.com; s=mail; t=1696699726; bh=J/gSQvoC54wwOay2Fyo/U/lq9WCB0om5hPzpv13lVUQ=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type:From; b=qRVb9wcbO71UqkI7wvS+0ptJYd4/PE4tjQEUe4qoaSBZj/oWXM75uhYkSzj0EODHj z+uyfPwtBnr2H4gBeuR0y0NqqlbE0IKAG5JOx7SBBBoKRgF9NlXEBhpy1VaHrLcUZ2 lBGyhZUeBOVIDWSSby2UXYfwQt9DSSs2ytLjtrkg5WxYCfdw0zJ1NCWc/axMfR1QwB 0JiA5isoG5EJfUExPxe600cP3+JAbHcDLvcDHg1VXw8lRmVbejE3qidPbHHFCnz+TQ r3UklRSagV3OPGbsKoXLE1zMe8eirc/8rs7FLUojEpFaz6h+LqephRfpYHKcFzZheh bb1WHSZa6T9aw== 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; Sat, 7 Oct 2023 20:28:46 +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; Sat, 7 Oct 2023 20:28:45 +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 v3 01/12] vsock: set EPOLLERR on non-empty error queue Date: Sat, 7 Oct 2023 20:21:28 +0300 Message-ID: <20231007172139.1338644-2-avkrasnov@salutedevices.com> X-Mailer: git-send-email 2.35.0 In-Reply-To: <20231007172139.1338644-1-avkrasnov@salutedevices.com> References: <20231007172139.1338644-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-m01.sberdevices.ru (172.16.192.107) 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: 180453 [Oct 07 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: 535 535 da804c0ea8918f802fc60e7a20ba49783d957ba2, {Tracking_from_domain_doesnt_match_to}, salutedevices.com:7.1.1;100.64.160.123:7.1.2;d41d8cd98f00b204e9800998ecf8427e.com:7.1.1;127.0.0.199:7.1.2;p-i-exch-sc-m01.sberdevices.ru:5.0.1,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/07 16:48:00 #22085983 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 fry.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 (fry.vger.email [0.0.0.0]); Sat, 07 Oct 2023 10:29:32 -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