Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp4438583pxb; Mon, 21 Feb 2022 21:38:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJwfkMO3ZZXFznJkRjqC6ixYuCHCMH1pEybCNuP59eecpwX05ptBHqFnPGaubC8WkjAPdm2C X-Received: by 2002:a05:6a00:244b:b0:4c9:319e:ecb7 with SMTP id d11-20020a056a00244b00b004c9319eecb7mr23193881pfj.58.1645508296056; Mon, 21 Feb 2022 21:38:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645508296; cv=none; d=google.com; s=arc-20160816; b=BDnfMPt5enYM8Tg8aHsz382i0hgo1kd/lEzTl18bIvZdF6EPkTQ4Hl9sBNGJOa4U6k LnOKekgs9NxssQ6tEQVyopU4FLlRKrm6zM2+6/oZS/6kmd04pOkzYygGZwkjXboNTUN7 jME3qrwqCDQrfgPqH0iKujYFG1Yw5dl3g8Fz7KOcbwosKip4wX2PYNeEb4npbvyPlbIs pM9zRdONUl6knvPuLwwmdbs90m0QkLFpIbCYtcWu+uaSQvI4AUkKSUS+w1xiU+Pz7shh BQCUXlBvKz4VvZ83c4uhEKqtyf4ugH+0DWwGKewmCSLunpOG4HQ3MZjrsP2kC3UWbBDz VjGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:organization :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=XmMT3EWtd+ciLfBzi+9TAwPbS18Eh5Hhy+YbNx2fXt0=; b=Q3syDfRhSVY+yMpmaLEYE+H2uePFnU1WTRpi3ZuLiOWxkyahYFKcRorXjkwbbrCI79 NBGCMzxDF3Rn8AnK2N73sSobL15IBIjaK9XlyYKWzlfe0Ik5bhPpi70gGQpeFIbXyZb1 sfdsK3jBQYkZmvmQXOJpOrQ1obumcPFKqgtlg1w/mnPEvTI+QN6mi41qvWyp7la0oif/ jYBudLyTBtHAqxdLWirzp2Dv/lPe1PimVjDcm3Cr/pXhy+eo+k3azd5OSMtWr4Hg9EgD VEVGJUl9j1SMoy777a/LPky9s+GbXosz4B0+Qs/98QXZWL9tcqYMKfebHGFZ7fBqV/1Y +Ukg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=ClWyCP3Q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id w11si3528611plp.400.2022.02.21.21.38.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Feb 2022 21:38:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=ClWyCP3Q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 547FE1285B1; Mon, 21 Feb 2022 21:05:28 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237733AbiBVATf (ORCPT + 99 others); Mon, 21 Feb 2022 19:19:35 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:33690 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237815AbiBVATL (ORCPT ); Mon, 21 Feb 2022 19:19:11 -0500 Received: from wout4-smtp.messagingengine.com (wout4-smtp.messagingengine.com [64.147.123.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F1E4925E85; Mon, 21 Feb 2022 16:18:32 -0800 (PST) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id EC12B32020A4; Mon, 21 Feb 2022 19:18:30 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Mon, 21 Feb 2022 19:18:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=XmMT3EWtd+ciLfBzi+9TAwPbS18Eh5Hhy+YbNx2fX t0=; b=ClWyCP3Q0+m9yPFE7QpnuAWSp8luBTmJ3dLZy+53AyJh/Zew6r3VyamYI iIhemKxWThFxC9kjEGU4HTzWxms0kukrEJ21uNabiUgyw1CWTJB8I6V/Yajjg6aG gJi1YtMtbrm7sM9Erce+fv++TOxyyHvQDRqtgOQNB2w83NYj3DclV9DMyMOCCNsa 4yZATPgb5G4jVwJtkfCtvFQN8JEHz6vt+tTs7J7HHu4aWtEHEEHMcn3ZO+9kB5jW VrLEjdY0doKSnZi71hE3tknHK7T/mwblYjPTeOwZu4g4jwtWSHWbG6ogEAKC9u+4 UhNrMNXlgXOqMVRm3xFGpr2MkjzXA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrkeejgddvtdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofgjfhggtghogfesthekredtredtjeenucfhrhhomhepofgrrhgv khcuofgrrhgtiiihkhhofihskhhiqdfikphrvggtkhhiuceomhgrrhhmrghrvghksehinh hvihhsihgslhgvthhhihhnghhslhgrsgdrtghomheqnecuggftrfgrthhtvghrnhepffdt uefffeduhfelueegvdetheejvdehteelfeetfeekgfekkefggedtgefhieejnecuffhomh grihhnpehkvghrnhgvlhdrohhrghenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgr mhepmhgrihhlfhhrohhmpehmrghrmhgrrhgvkhesihhnvhhishhisghlvghthhhinhhgsh hlrggsrdgtohhm X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 21 Feb 2022 19:18:28 -0500 (EST) From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= To: linux-kernel@vger.kernel.org Cc: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= , stable@vger.kernel.org, Michael Brown , Wei Liu , Paul Durrant , "David S. Miller" , Jakub Kicinski , xen-devel@lists.xenproject.org (moderated list:XEN NETWORK BACKEND DRIVER), netdev@vger.kernel.org (open list:XEN NETWORK BACKEND DRIVER) Subject: [PATCH v2 2/2] Revert "xen-netback: Check for hotplug-status existence before watching" Date: Tue, 22 Feb 2022 01:18:17 +0100 Message-Id: <20220222001817.2264967-2-marmarek@invisiblethingslab.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220222001817.2264967-1-marmarek@invisiblethingslab.com> References: <20220222001817.2264967-1-marmarek@invisiblethingslab.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Organization: Invisible Things Lab Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 This reverts commit 2afeec08ab5c86ae21952151f726bfe184f6b23d. The reasoning in the commit was wrong - the code expected to setup the watch even if 'hotplug-status' didn't exist. In fact, it relied on the watch being fired the first time - to check if maybe 'hotplug-status' is already set to 'connected'. Not registering a watch for non-existing path (which is the case if hotplug script hasn't been executed yet), made the backend not waiting for the hotplug script to execute. This in turns, made the netfront think the interface is fully operational, while in fact it was not (the vif interface on xen-netback side might not be configured yet). This was a workaround for 'hotplug-status' erroneously being removed. But since that is reverted now, the workaround is not necessary either. More discussion at https://lore.kernel.org/xen-devel/afedd7cb-a291-e773-8b0d-4db9b291fa98@ipxe.org/T/#u Cc: stable@vger.kernel.org Signed-off-by: Marek Marczykowski-Górecki --- I believe this is the same issue as discussed at https://lore.kernel.org/xen-devel/20220113111946.GA4133739@dingwall.me.uk/ Cc: James Dingwall --- drivers/net/xen-netback/xenbus.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/net/xen-netback/xenbus.c b/drivers/net/xen-netback/xenbus.c index 3fad58d22155..990360d75cb6 100644 --- a/drivers/net/xen-netback/xenbus.c +++ b/drivers/net/xen-netback/xenbus.c @@ -824,15 +824,11 @@ static void connect(struct backend_info *be) xenvif_carrier_on(be->vif); unregister_hotplug_status_watch(be); - if (xenbus_exists(XBT_NIL, dev->nodename, "hotplug-status")) { - err = xenbus_watch_pathfmt(dev, &be->hotplug_status_watch, - NULL, hotplug_status_changed, - "%s/%s", dev->nodename, - "hotplug-status"); - if (err) - goto err; + err = xenbus_watch_pathfmt(dev, &be->hotplug_status_watch, NULL, + hotplug_status_changed, + "%s/%s", dev->nodename, "hotplug-status"); + if (!err) be->have_hotplug_status_watch = 1; - } netif_tx_wake_all_queues(be->vif->dev); -- 2.31.1