Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp2156220rdh; Tue, 26 Sep 2023 14:29:56 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE6J/sDQ4isVHxPyFXuexmHSe6+giNsjChWpKZCKcXVbMH+XFER0ywYtCxaQEIe2tQCjmfo X-Received: by 2002:a05:6a20:8f1a:b0:13d:5b8e:db83 with SMTP id b26-20020a056a208f1a00b0013d5b8edb83mr133183pzk.9.1695763795689; Tue, 26 Sep 2023 14:29:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695763795; cv=none; d=google.com; s=arc-20160816; b=cndj2Uoe0GGAIhFL6HaCgZXCql+kt39JVypgQqSoAEIpM/8Ther1QMgkaUPA0bOJCn tgw6grVT8+UPWxSgbfN//mmX4ks7eBFIlAdaOXNxZkgDfHs+ovFSbe+SArLM7T2uAqEs wdsLQgPiRSUhRy1LpbK0mZZ15tmT8/JxK7F4nP8NFWdEA3P9VyPcSavyZfbYrTEO7HJZ xs3qZ5hBTbcvZ4tO6mtWvA+0bPbHhWhEVcTh2tJuQvMyVPOaB8ULAahfx0eapFiSGQgL v4iV30FDfsAMPRk71QK2cg8nLUakrWo28GgxG1e7sHv/9+Z3618Z2i2vPIu56FGs0Hxs yYDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=2uW5BPkL7G62EXjKucVaT4hjcyiDQF9d1Ksud/nFSa4=; fh=JEq7ZyqHwnKMAbPjHbEHIOO1u1YxTWxtQlCbJmwG+xw=; b=YUugUogyLfRqnGfDGTrEwmOxN0Xq39BncvUpcwOVt07JYYGAM+5uR+mk3oA8CTmNqk Sg+9iwqJYZHVHPILzTEaMWAMhEiqOT8oQJS4j9JjrTl2uCcebMsQOlS2KO0HOsHeitoP aZzbPdJUhpqN64lAK1Ugg7LQun/+cfRJ7OEWEqkhC08oVaRdb6ot160egsbyT8xmONUE 1YE38synGdrHOjvcoswip5+CjTYpQ9YPOGnH2JiDz1RI0d+rmWS91R6cXon+XrAUhMpX zLtEUQe//l/YoXHeO6h+TOTwhB2QMn6tKbhP9cV9xNs7/qBiZ/qtnhxkMG80aaN+0Et9 jFEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=F2uh2LRe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id q92-20020a17090a756500b002766bd6d3f3si15478452pjk.10.2023.09.26.14.29.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Sep 2023 14:29:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=F2uh2LRe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 090848053619; Tue, 26 Sep 2023 05:55:53 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234536AbjIZMzv (ORCPT + 99 others); Tue, 26 Sep 2023 08:55:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47312 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230125AbjIZMzu (ORCPT ); Tue, 26 Sep 2023 08:55:50 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA2FBF3 for ; Tue, 26 Sep 2023 05:55:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695732900; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=2uW5BPkL7G62EXjKucVaT4hjcyiDQF9d1Ksud/nFSa4=; b=F2uh2LRekgMw6h7iAASK4puNgf47moQBrHHV9zbt4iArrZCvarzcQl8kRlER7L3WZVDVPF lgZUk6csC65UEYfebH7mHXVT0CRtJQEedTzJuSLimKtBnuQS7Qi0xpomu7n1j2fNRNJtfo 3UjjVFS6SYBsfFzvfS5frMXHT8DPLw8= Received: from mail-lj1-f198.google.com (mail-lj1-f198.google.com [209.85.208.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-627-w0xhm0A_NF-uFPFhrnWkQw-1; Tue, 26 Sep 2023 08:54:58 -0400 X-MC-Unique: w0xhm0A_NF-uFPFhrnWkQw-1 Received: by mail-lj1-f198.google.com with SMTP id 38308e7fff4ca-2c15572d8c5so81656201fa.0 for ; Tue, 26 Sep 2023 05:54:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695732897; x=1696337697; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=2uW5BPkL7G62EXjKucVaT4hjcyiDQF9d1Ksud/nFSa4=; b=gESZm8NLDlAeqs0DXiMF8g2bjpGdDbMPdnOzQIvpECF2FRt+afSXNTaP/ggYB7Lnok HK+qJhhXH3aHgGaAXIpsrVRzYQfEaosOB+vMrZL8rAdopoLzF6sXYLfiPYnnTm/UruPV /9ryh4CHtEYkhT/e+yyNmR5ywsK2UNpPf23IiyDVAjemirJshbtqSJScLxA+9muKsj4t kQhHYC1SuMLf+LUXmxwR1c07uUhn2SzN488My18kuKAvSvClUPzV4ELBB46Eli/FXEUy 7gvQaMbCfxhL7dXWZeuz+Hc3OsfuFcvxM71gLL+tgX0WblKoQ+XxTorPREFvicdG2fWm uKdg== X-Gm-Message-State: AOJu0YwxOzV0Ibnydb+lYK3uzDFjg+D2P+21CBzkNAlsrG7J/6dyAO3L A1hBjsrt26a3owue2rJY0PuMBD3jWC5oJ4XkWwFsGOju4+Ujam/kWd6prPB1pxK4pnWe3KN84s1 44jzb6KoPReUsz+FWZSweIJgS X-Received: by 2002:a2e:b04c:0:b0:2bb:a28b:58e1 with SMTP id d12-20020a2eb04c000000b002bba28b58e1mr8106221ljl.41.1695732897302; Tue, 26 Sep 2023 05:54:57 -0700 (PDT) X-Received: by 2002:a2e:b04c:0:b0:2bb:a28b:58e1 with SMTP id d12-20020a2eb04c000000b002bba28b58e1mr8106195ljl.41.1695732896938; Tue, 26 Sep 2023 05:54:56 -0700 (PDT) Received: from sgarzare-redhat ([46.6.146.182]) by smtp.gmail.com with ESMTPSA id j17-20020a170906279100b0099329b3ab67sm7735262ejc.71.2023.09.26.05.54.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Sep 2023 05:54:56 -0700 (PDT) Date: Tue, 26 Sep 2023 14:54:51 +0200 From: Stefano Garzarella To: Arseniy Krasnov Cc: Stefan Hajnoczi , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , "Michael S. Tsirkin" , Jason Wang , Bobby Eshleman , kvm@vger.kernel.org, virtualization@lists.linux-foundation.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@sberdevices.ru, oxffffaa@gmail.com Subject: Re: [PATCH net-next v1 01/12] vsock: fix EPOLLERR set on non-empty error queue Message-ID: References: <20230922052428.4005676-1-avkrasnov@salutedevices.com> <20230922052428.4005676-2-avkrasnov@salutedevices.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20230922052428.4005676-2-avkrasnov@salutedevices.com> X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.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 (lipwig.vger.email [0.0.0.0]); Tue, 26 Sep 2023 05:55:53 -0700 (PDT) On Fri, Sep 22, 2023 at 08:24:17AM +0300, Arseniy Krasnov wrote: >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 reproducible only with MSG_ZEROCOPY, as >this feature is the only user of an error queue of the socket. So this is not really a fix. I'd use a different title to avoid confusion on backporting this on stable branches or not. Maybe just "vsock: set EPOLLERR on non-empty error queue" The change LGTM. Stefano > >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 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 >