Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp3854978pxp; Tue, 15 Mar 2022 07:35:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwqvd8UNYWm9LPAbp8HLTjj9jipxqC10SQfTuKMBdVm/xP+Tbssy2EOR4PcVy9md/z08D5X X-Received: by 2002:a05:6a00:1943:b0:4cb:79c9:fa48 with SMTP id s3-20020a056a00194300b004cb79c9fa48mr29033664pfk.47.1647354909047; Tue, 15 Mar 2022 07:35:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647354909; cv=none; d=google.com; s=arc-20160816; b=NYbqRos2cVPBKVHNxn7x9G+iIe4KprTkVJge5bnnfsO25DRiW5Uwpx2CmDAmQOa+ma //E+pTjwOvMd2W5k7tmn0kMKumoO0C8+QbOlR/BixJcdRBlMS3V7ZsJsjUl7ckdIRryG Je6/Dqi3NQ3PXc2u/yrLq8+a73eDcjqyw5enZ/Pg+qSNhDGZhNr6QLHD1kc6jVBDkNYO L+ZTuZ4vOspF/Zxsl+ZJ6pcggHzU/EvKUsm4+mefEZKzSv+yo9yATVhUGO3SRQZGJeWj CLxpdzvrm9v19JaPAwIna2jm65yNkjxQ5nGRQ7Z3SfLKFLSDPhmbg23vhmThsmGUs324 OeIA== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Df8UCjbFKHBgmmlcfmzaFDDVz+xkSMAdivI2ikQXP/w=; b=Ae/E6IJmBw44Jrlp0ekauTf8sDuV+KLujTnJhQ77gh/cVbBVKQQoQSd+6hvy0U/guw QwcmTpmwDQ9S5hrlkKpkX3/y1NknNrMN2N5UIbVGkzVNPoIPPog4NxoiinUUHX+2HvAk pt1VtbskBVVBqp+l6IL+c8VTeDVCrDRAp8s6RjY2vyN17xjAptViGtBoEo1oH3rMwypu ct2AtHs9jYiZkI1r1RjtsZ8UeGdJRiuZqDFQJQwwzSaFaEu5TCh3RqUh+QuR/f8G/2KV KeYL3akkq/WEL9/s4UgiTzDZtQKxelJGYKK3AhbIDFgwgUxxPMKzHn8nFTugJU/mnX+e EQAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Xq+ihMYf; 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=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d2-20020a17090abf8200b001becc857a91si2133355pjs.79.2022.03.15.07.34.55; Tue, 15 Mar 2022 07:35:09 -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=@linuxfoundation.org header.s=korg header.b=Xq+ihMYf; 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=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241995AbiCNM2g (ORCPT + 99 others); Mon, 14 Mar 2022 08:28:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48960 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243551AbiCNMU5 (ORCPT ); Mon, 14 Mar 2022 08:20:57 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 07AB854BF4; Mon, 14 Mar 2022 05:16:19 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id B519BB80DFB; Mon, 14 Mar 2022 12:16:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E9039C340E9; Mon, 14 Mar 2022 12:16:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1647260176; bh=y9LNOtA0ZosUeRoySr2nYOAjfjc02VpHHJ/PyJlwL00=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Xq+ihMYfg9IatUg2bp3H+PHE5MnMnWWRux07U1mhVELq22kzsNMyl+GwKfNbQ7GVz n/Cl0FXXyPX8o7iJwr6PhfCPCbiS98zhavYszeIFaORkFnfT2qxePXwScQWYIoCaBL pBydx4XC9d58bJzb4tHVsgs50h/VhFiXk5vKWflc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= , Paul Durrant , Jakub Kicinski , Sasha Levin Subject: [PATCH 5.16 078/121] Revert "xen-netback: remove hotplug-status once it has served its purpose" Date: Mon, 14 Mar 2022 12:54:21 +0100 Message-Id: <20220314112746.298608019@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220314112744.120491875@linuxfoundation.org> References: <20220314112744.120491875@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-8.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,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 From: Marek Marczykowski-Górecki [ Upstream commit 0f4558ae91870692ce7f509c31c9d6ee721d8cdc ] This reverts commit 1f2565780e9b7218cf92c7630130e82dcc0fe9c2. The 'hotplug-status' node should not be removed as long as the vif device remains configured. Otherwise the xen-netback would wait for re-running the network script even if it was already called (in case of the frontent re-connecting). But also, it _should_ be removed when the vif device is destroyed (for example when unbinding the driver) - otherwise hotplug script would not configure the device whenever it re-appear. Moving removal of the 'hotplug-status' node was a workaround for nothing calling network script after xen-netback module is reloaded. But when vif interface is re-created (on xen-netback unbind/bind for example), the script should be called, regardless of who does that - currently this case is not handled by the toolstack, and requires manual script call. Keeping hotplug-status=connected to skip the call is wrong and leads to not configured interface. More discussion at https://lore.kernel.org/xen-devel/afedd7cb-a291-e773-8b0d-4db9b291fa98@ipxe.org/T/#u Signed-off-by: Marek Marczykowski-Górecki Reviewed-by: Paul Durrant Link: https://lore.kernel.org/r/20220222001817.2264967-1-marmarek@invisiblethingslab.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/xen-netback/xenbus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/xen-netback/xenbus.c b/drivers/net/xen-netback/xenbus.c index d24b7a7993aa..3fad58d22155 100644 --- a/drivers/net/xen-netback/xenbus.c +++ b/drivers/net/xen-netback/xenbus.c @@ -256,6 +256,7 @@ static void backend_disconnect(struct backend_info *be) unsigned int queue_index; xen_unregister_watchers(vif); + xenbus_rm(XBT_NIL, be->dev->nodename, "hotplug-status"); #ifdef CONFIG_DEBUG_FS xenvif_debugfs_delif(vif); #endif /* CONFIG_DEBUG_FS */ @@ -675,7 +676,6 @@ static void hotplug_status_changed(struct xenbus_watch *watch, /* Not interested in this watch anymore. */ unregister_hotplug_status_watch(be); - xenbus_rm(XBT_NIL, be->dev->nodename, "hotplug-status"); } kfree(str); } -- 2.34.1