Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp639142rdb; Sat, 30 Sep 2023 21:41:56 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF4IfySmMD8STs+SZMB43vG2ZfXMrNGX1FyMUS9XJygnXtQDLlgrstwVlmd8PYQFarVw3Wq X-Received: by 2002:a17:902:7246:b0:1c5:df3f:89e5 with SMTP id c6-20020a170902724600b001c5df3f89e5mr8683816pll.62.1696135315980; Sat, 30 Sep 2023 21:41:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696135315; cv=none; d=google.com; s=arc-20160816; b=W8bjqPJn447zD/Kj9KcjOkr8Fv/T0sVRX4WJbBH37oIhGSfoXsXEWy0azRjZ0YAjA8 kazrcecZdEPFDlpWreoIBRtR55nTP4ZhrcPmlJ4+TnNNPzL5D1lfDAgGwmVpEirbjAKD dvMU6JjdRlihZKDG1OoLffvGKuqGNxr9mdvjKEq0WuDQZjmZMdgYwA8QbN8Km6WPqmic OgBPFFetl3EFvlgz2XO1EWD6Qd7nKRZ2ztLo1biAqGjcKbRIpFmXjq3/XmioB3krrBJt /+l25hXnLnOtHz+ysFmmIUQsLgB+3/pklez1oTC9akz1N5N3rWGEnTY69ORBCIUwx1dT JWww== 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=9ZuEjv/74GDFuU9L6NT1O/sfdgXtQNbAQ1HVZ8WPU1Q=; fh=wIHqZpOIuzcidDZ82yQbOZuyHJty7uvaWDEh/efoVzA=; b=k6C8e9GSYlMyTavWJzca+R5YPw/WSYZe4Qa3eiboRJW7vCIakVzj3hUmudooKzHN6r c7p+Y7AHxD+JXveeKxkP/Jrb52RUZ2myf2cXOHbOn7IKfN4FfNmxUO+88+wKWCXgX/lF z37hDGUB57V3PgKFnjOLVk7m6HQ6jcieaY+KaJdlYebwA66uZY5r+HEF6rUi/ROct8hR QlUE70WlRSdVHZjVMQXNvX6zUibGHAPbbL4zp3xk56dWzmnWalh5HUwbIH7O4kX+dxNn z9bgy3pBFvdywhUk0Bu1SjEA0xQRXQlXtSRnTySJ84g0Efp+FF2IgD300nOPg6rCcA+5 8hkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@salutedevices.com header.s=mail header.b=KUmnYJHb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id d19-20020a170903209300b001c7374da019si6751267plc.13.2023.09.30.21.41.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Sep 2023 21:41:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@salutedevices.com header.s=mail header.b=KUmnYJHb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (Postfix) with ESMTP id C6B20801CBED; Sat, 30 Sep 2023 14:10:45 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234054AbjI3VKj (ORCPT + 99 others); Sat, 30 Sep 2023 17:10:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52060 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233906AbjI3VKf (ORCPT ); Sat, 30 Sep 2023 17:10:35 -0400 Received: from mx1.sberdevices.ru (mx1.sberdevices.ru [37.18.73.165]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5FF0FE5; Sat, 30 Sep 2023 14:10:31 -0700 (PDT) Received: from p-infra-ksmg-sc-msk01 (localhost [127.0.0.1]) by mx1.sberdevices.ru (Postfix) with ESMTP id 21286100005; Sun, 1 Oct 2023 00:10:28 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.sberdevices.ru 21286100005 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=salutedevices.com; s=mail; t=1696108228; bh=9ZuEjv/74GDFuU9L6NT1O/sfdgXtQNbAQ1HVZ8WPU1Q=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type:From; b=KUmnYJHbpki4jUHXzv4BQPJnwbg38Oep+gk6BnGINY/+cEWvhYMa7v4YEqvDJ1hrZ CuOuS/aoTrnuCdy1KFt+9NRE7bIGLIhDGXBhvySTHAXQ3JIUKgK71e/oT5ljzt3qIg vF5crAFDDQWXc+6N4tzHRU0rFa44z3tziVPKLUPhjAdnfs9tzaX45RTfUdC7l0s6A2 C7IVoZx0+oZ+2DLPNvdnc4qPL3NJAJBfMMUCJaZ4xUAF1t0uvNj6nFPtemLc5ezHTI /PBcKzrgb7VDad1XPsYtgk5nlqh1EFtqXp8amkuBUfbk8dvBi/5XmTgffpl6VaBiqP Ji3DGp3sBE2RA== 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; Sun, 1 Oct 2023 00:10:27 +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; Sun, 1 Oct 2023 00:10:27 +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 v2 01/12] vsock: set EPOLLERR on non-empty error queue Date: Sun, 1 Oct 2023 00:02:57 +0300 Message-ID: <20230930210308.2394919-2-avkrasnov@salutedevices.com> X-Mailer: git-send-email 2.35.0 In-Reply-To: <20230930210308.2394919-1-avkrasnov@salutedevices.com> References: <20230930210308.2394919-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: 180254 [Sep 30 2023] X-KSMG-AntiSpam-Version: 5.9.59.0 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}, 127.0.0.199:7.1.2;d41d8cd98f00b204e9800998ecf8427e.com:7.1.1;p-i-exch-sc-m01.sberdevices.ru:7.1.1,5.0.1;100.64.160.123: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/09/30 19:49:00 #22015058 X-KSMG-AntiVirus-Status: Clean, skipped X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_NONE autolearn=ham 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Sat, 30 Sep 2023 14:10:46 -0700 (PDT) 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 --- Changelog: v1 -> v2: * Update commit message by removing 'fix' word. 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