Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp4757434rwr; Sun, 23 Apr 2023 12:34:07 -0700 (PDT) X-Google-Smtp-Source: AKy350bVhm/blnIDNwInOtJgn7NSGIC4K5yHb84xzXDIgtfBBuCjSVus7rx0lYqeX8nEAkCHQy+o X-Received: by 2002:a05:6a20:734c:b0:f3:2d33:de79 with SMTP id v12-20020a056a20734c00b000f32d33de79mr5898573pzc.43.1682278447591; Sun, 23 Apr 2023 12:34:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682278447; cv=none; d=google.com; s=arc-20160816; b=1KrTpbuMi0n09pY6gzDoPoUV5LmhDAo7Ye/TM0IDntkil5SHF+NwweZ5F54DOxXMiQ BrUEM0i+PYvA8rw38hdkKIBbrIoR+o7z4fAmYH7VQ0sGK0dvsv+GChOn4YfbDfHBscQ7 y0+IK3SI4Wf6DxgDXYIhnO1U5MAXJiKdU83JQeL9I3SPfpQIpTtB/KPJuNV0hWUMNWOi 4r/+R3jR572ul/KIhEaX+eqO39A2DEweTGhyqtN0EIy+dSjcXwu2fyQ8mcFE70wSRi5x 9L2B8ENj/O7YNG8h6CRJM20zN8lMdrxku17XOQXuIf+XBZm8kaAfP8yA6euNH8uuhgBP gbfg== 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; bh=92TjpAFzgN19cdeV3DB5ob03wq+mklevZg38Rj0IMpE=; b=aH8sxZTGaJZPjSGj1YCG7QWAxulezuxoHmL0Lif+nfVI7jPDA+iBm9UhVaHeP4qYc9 VUPVMH1npiAPcC6TNvoGyrgf5f6vZ3PUHO6pu4xn2w007XLDYBmkeVKHQvT1PC1rO4M5 KXX7C8jt3KoeL8f2fw3C+EERaPPMSiqt4KOODiQ6LDdjJA+1fcRaqri4B0ZuV6HADFip gFT7RuTQyVko3+TEhitTGF68VEoigW+DeEN7hAEnYQPOZFs3fTvu41GJLPYNII5hzcmk yIdPWkuGXckkIbDvyGfKEmlt55FGo25xcuBq+WpWQz5UFY+Lynv1Fjs+QNefvx/Kb914 YicQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sberdevices.ru header.s=mail header.b=Mng9PSOv; 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 z11-20020a6552cb000000b0051942a23eefsi9424217pgp.533.2023.04.23.12.33.50; Sun, 23 Apr 2023 12:34:07 -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=Mng9PSOv; 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 S230406AbjDWTcM (ORCPT + 99 others); Sun, 23 Apr 2023 15:32:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56254 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229908AbjDWTb1 (ORCPT ); Sun, 23 Apr 2023 15:31:27 -0400 Received: from mx.sberdevices.ru (mx.sberdevices.ru [45.89.227.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DD59E10E3; Sun, 23 Apr 2023 12:31:26 -0700 (PDT) Received: from s-lin-edge02.sberdevices.ru (localhost [127.0.0.1]) by mx.sberdevices.ru (Postfix) with ESMTP id 845135FD11; Sun, 23 Apr 2023 22:31:20 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sberdevices.ru; s=mail; t=1682278280; bh=92TjpAFzgN19cdeV3DB5ob03wq+mklevZg38Rj0IMpE=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; b=Mng9PSOvlrxvx5X/lA8GlGv+KKcbYKMDrsWhqZzW/HNfBLp1wasviZQwRM4f6Q7eG 0U0mIPJ2/rUrBhRf0NueNKj9bNnR9jTVb0c/HaG89B2FGYkI23Ax/XhcPq0EAAhaxD q5gceOhOxvJmuBrEr10WX1yMjKRmchmucWX4w0zShfGACUvI9dsqzdPT5iMjCkGrgn eule7pCMmBOedTnBw4/ljqYCZsF1lv6u4lg/pqxvEQGZFhHLm/5Ar5OdhcFPDnnfax Q1xB4wlEKLQz7oQ444+Z1OqPw9fy6lXqVgBWDEmK8F3Rox4PwAyB5jWaNhH22jsAgg sHvwA9O0Pz06Q== Received: from S-MS-EXCH01.sberdevices.ru (S-MS-EXCH01.sberdevices.ru [172.16.1.4]) by mx.sberdevices.ru (Postfix) with ESMTP; Sun, 23 Apr 2023 22:31:20 +0300 (MSK) 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: , , , , , , , Arseniy Krasnov Subject: [RFC PATCH v2 06/15] vsock: check error queue to set EPOLLERR Date: Sun, 23 Apr 2023 22:26:34 +0300 Message-ID: <20230423192643.1537470-7-AVKrasnov@sberdevices.ru> X-Mailer: git-send-email 2.35.0 In-Reply-To: <20230423192643.1537470-1-AVKrasnov@sberdevices.ru> References: <20230423192643.1537470-1-AVKrasnov@sberdevices.ru> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain 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/04/23 16:01:00 #21150277 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,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE 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 If socket's error queue is not empty, EPOLLERR must be set. 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 413407bb646c..137a0db6eaac 100644 --- a/net/vmw_vsock/af_vsock.c +++ b/net/vmw_vsock/af_vsock.c @@ -1030,8 +1030,8 @@ static __poll_t vsock_poll(struct file *file, struct socket *sock, poll_wait(file, sk_sleep(sk), wait); mask = 0; - if (sk->sk_err) - /* Signify that there has been an error on this socket. */ + /* Signify that there has been an error on this socket. */ + if (sk->sk_err || !skb_queue_empty_lockless(&sk->sk_error_queue)) mask |= EPOLLERR; /* INET sockets treat local write shutdown and peer write shutdown as a -- 2.25.1