Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2586116rwd; Mon, 22 May 2023 00:47:24 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5lTV3R30dX5Q1C6kmeXpLRx2UNtluKbLwbydUy3EUxmmEcSndPzS8CTrgpklJN9Cyy3cMM X-Received: by 2002:a17:903:22c2:b0:1ac:85b0:1bd8 with SMTP id y2-20020a17090322c200b001ac85b01bd8mr11287500plg.34.1684741644322; Mon, 22 May 2023 00:47:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684741644; cv=none; d=google.com; s=arc-20160816; b=NabJ1NC/w9sWPDmpsSfsi6H3Fi/Gm6QwFymeocI/aDvG5JT7ua3ZVG905jSLCUVleD hse6BxR9Orbg1ebCqYb9ctn/F8gThkpmchxbVPxtj81qetebtJtMI3qGmpwuz2NU5ppr Lz2U/MN0w1bme0pirF4A4WIjPBnfGp7AMC36nW0rB6ryPjkuHQNl/ELtloHzH7pxfzYr sSo5dPcnnJpuYG2g13dgJ6LdsSIqEW+kvCSP0opznlwxZ3pGq0556ZwkH86/PqfHGAYA mgZqCUKhD7XXeQZH+dYVQiCA/Oru9g6RFlA0yq2u3Aim5W7+F8NscYsmPbWA2XaEEX+n rETg== 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=T4VPQ+2KRx7PQirc2TEjhsgiTWul36vrSM2wuHKSIkQ=; b=iqySTXYmDFSyK8gL+JIivXUkgumZSC1Sucdo7ACZ9+XnemIh7L8RUW90qK9XsaMNIF vuWrvjpw2jWKvc/IaQU64uMa4LMjQjs5CA6tUimyXhcHBhUXpNjw6fkq6qyECyyAuuLL OJfILe3HgUY+BuSeNutsLH9yscdS8dXbGK0/3aT2Pfd7RfStb1zi8W1Q+xfP5cfGFSzg LLr9whYS5tzwVSbynC64knXwsVSSNor2DIHLFJ+xJEK2oU+H0VxKl4nX+8lwY8BrElXg zz/P34htUPnjgrfG3kfh9Mru2OqwjMlJ7ekDsi504iFvcJ1oHlFUeP9Kh6s8q70G/TFY cu2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sberdevices.ru header.s=mail header.b=Y5eMpab3; 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 y2-20020a17090264c200b001a51c26f601si4055913pli.627.2023.05.22.00.47.12; Mon, 22 May 2023 00:47:24 -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=Y5eMpab3; 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 S232774AbjEVHpp (ORCPT + 99 others); Mon, 22 May 2023 03:45:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34196 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232660AbjEVHov (ORCPT ); Mon, 22 May 2023 03:44:51 -0400 Received: from mx.sberdevices.ru (mx.sberdevices.ru [45.89.227.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BAB36AC; Mon, 22 May 2023 00:44:50 -0700 (PDT) Received: from s-lin-edge02.sberdevices.ru (localhost [127.0.0.1]) by mx.sberdevices.ru (Postfix) with ESMTP id 667D25FD50; Mon, 22 May 2023 10:44:48 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sberdevices.ru; s=mail; t=1684741488; bh=T4VPQ+2KRx7PQirc2TEjhsgiTWul36vrSM2wuHKSIkQ=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; b=Y5eMpab34LIf+imD9vM5eQ3D39MiMdTBnCv6InDRMbzU96z+7803HBJXHPWzeZhjM +HhqD9BrmMIwCd6SXPxb28CSeIhA+2mz8mXFaqBXEG6kjg+XAK3LW2dI38n77Ii/I4 vlbKtIHNY9CWYgxXKlIvjSjuYl/++HiUfDUZb/BuemR5TfkX9v147VzJf6Mwgl9bik Z/DSLve7imFxbCmb0ZKIcVNhwka60gzyjdO9u3eAk6/eiZm6WhJ9AW5tz91nl8Sq6C OPoLavAnhsU3eA7Wz5YNpagmpq7dSZVhRh0nPGp5tyKK4QBMToe16ix7Qp0JFbR3qP Xln0iqL7+Y3YA== Received: from S-MS-EXCH01.sberdevices.ru (S-MS-EXCH01.sberdevices.ru [172.16.1.4]) by mx.sberdevices.ru (Postfix) with ESMTP; Mon, 22 May 2023 10:44:48 +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 v3 06/17] vsock: check error queue to set EPOLLERR Date: Mon, 22 May 2023 10:39:39 +0300 Message-ID: <20230522073950.3574171-7-AVKrasnov@sberdevices.ru> X-Mailer: git-send-email 2.35.0 In-Reply-To: <20230522073950.3574171-1-AVKrasnov@sberdevices.ru> References: <20230522073950.3574171-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-EXCH02.sberdevices.ru (172.16.1.5) 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/05/22 04:49:00 #21364689 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. Otherwise, reader of error queue won't detect data in it using EPOLLERR bit. Signed-off-by: Arseniy Krasnov --- 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 413407bb646c..eea2bcc685a2 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