Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp992835pxp; Wed, 16 Mar 2022 23:46:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyKM4ZVXVsvneaDE1Sm3sBuTBTOu8SbWbgzwFXwNKNPRQKH4GsxqwSZ8+Hcay6EcwecopFP X-Received: by 2002:a17:902:6acc:b0:149:8f60:a526 with SMTP id i12-20020a1709026acc00b001498f60a526mr3651493plt.25.1647499560206; Wed, 16 Mar 2022 23:46:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647499560; cv=none; d=google.com; s=arc-20160816; b=GahDDX/IqoN4LB8ScqFzmv7KgHAhiIbZMr7YgurCtPcjPpa2FH9toXNXqiT7lHPOWc qpuIzMwxRYQJSZvfGqHXQcglCaGjyPqCObll4Oa931rIbHkTJ6d6oVQmUnHgpofAibPm Dwn4SU4xIbxCzeAYpl1rCWO7MBVtU7t9F1hrOUZAXhySBlSfYdvn6R6WBuT2YXrcLOr7 t4iwDMKwFrOMaqwyJDBMCDtRi2lScbPGTWEZ12NpBHhrSBsnPoAa/+h1q7azWpwd0Q7f D+5Cj4KoVW9jcDSunJBz05ti+3JNtYBwdtzicsKy1TmFJ7oipXiVkCYrV2wJAvHunqE9 uqMg== 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=gPxJCoJVBOBIiRE5mBFUOnYNzqx8IzH/1CvjOa51OztzrVJC09DUG+mp9eacPa9gsF P8Vz2EB9TSTYd3wGTjO5l1Z8r816czgyAIKK2jAygfm+aw0XpfZdKbvHOn+uEZxVc/4c 3INpqNRlEPT3CXJu5RjKQPUZpJ0Cs85XedK2GYXQg5bkyeuzkTmVr8tJIfsJrJSZZ286 h5tDGPMu5vPsRoW1fTw0GlxVfOxBl2To1J7w0F+9uh5qgYsE1KJj6lxioPLwVBHnKdWE hu0QlZuY/LP1k7LJ+5/dEYItefVQtt5eQiuj8RBM9kiqn3c5B3RoqRJPHy3s3C/gyRLk 6YvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=isaP8uNy; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id bf29-20020a056a000d9d00b004f7d9dac805si3499686pfb.216.2022.03.16.23.45.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Mar 2022 23:46:00 -0700 (PDT) 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=@linuxfoundation.org header.s=korg header.b=isaP8uNy; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 563AF2E044D; Wed, 16 Mar 2022 22:31:17 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242408AbiCNMTA (ORCPT + 99 others); Mon, 14 Mar 2022 08:19:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35374 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242458AbiCNMKC (ORCPT ); Mon, 14 Mar 2022 08:10:02 -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 294181402D; Mon, 14 Mar 2022 05:08: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 C90DEB80DED; Mon, 14 Mar 2022 12:08:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C6497C340E9; Mon, 14 Mar 2022 12:08:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1647259696; bh=y9LNOtA0ZosUeRoySr2nYOAjfjc02VpHHJ/PyJlwL00=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=isaP8uNy4h0RudfYdYMuaPIhR2XmtKScmiaCrJkuvg4It3ZDJlOCwMFr/7b/l7kc1 Es+geJwa/2b/ikvk2gQHf+hSPimNGg88Yi14Bz5GfNGmuGWNZnBlEyXcjnUbWdqkEj mXeSKxw2zZRoc8qzQ4JMedcLOuzvRFPAzfD9aXJE= 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.15 067/110] Revert "xen-netback: remove hotplug-status once it has served its purpose" Date: Mon, 14 Mar 2022 12:54:09 +0100 Message-Id: <20220314112744.906242916@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220314112743.029192918@linuxfoundation.org> References: <20220314112743.029192918@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=-3.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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