Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp3526887pxp; Mon, 14 Mar 2022 23:38:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwtndRIOclTIXYygzSI/P+7dmIyUR8BHDKLth1cqXNixBAGco3nlHWj6Yma2XIf482iIJva X-Received: by 2002:a05:6402:1e8b:b0:3da:58e6:9a09 with SMTP id f11-20020a0564021e8b00b003da58e69a09mr23276257edf.155.1647326294089; Mon, 14 Mar 2022 23:38:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647326294; cv=none; d=google.com; s=arc-20160816; b=HB2+tvBVV3WjvIqlmz4I1WSklpy7xowikEQB2u/cNmX2o3B+LG7uSATDF5H+Plpdsx bbNT0OnFgvg0l4eKJ417QgBLJ5UJ2ObJzMeNMkjIRx6H/qnjSyRSNyjLCrBCko7E4ays hOvYUYOpddNEHz9wF0PWrRzaqEq69tctE59QOIXHGT7jbPU7pWHNtGbsDP21ziJcKFX3 /gkoHUgB/c7PbsxCUTtzXCfgSRp1KOenCjOElXnV2LW1KVYCRqkpVPwHW+1RL+gf2TK9 B96Rh91Njmws7zbhNRYIw4ZFknlAKL7ML6JgwoxDogPWdCfLw83/DRcG0Fax3vboURfj OzbA== 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=y/JZ1vunHzd7qfrIfBaJNaQLGmHmDW7+5w4d6Ma/oi4=; b=xu3PjCzQHKbrF5OHY+V1nRZT39Ex2X0Bx7z7Xq3MVV4D8SI4ezQGFOSji1umJNcd40 RRFVTJS05UeSU2AIA5Qi5jmJOBZYQhs7oJ+U0p8b8wVvW8LHhfi3LG+ROsEqalv31wc/ CHV17KL8eV19Fn6TknV2blugSmIXR5aNO1fCxhiA3J+1ixWHF/dZU4s1cAzznXVNn8Qr yheWquwJyby9FnuYPR524heXNbd3bCNffTZKY0y9kSU45jGf1RnjoRlesgBsyv0dPTmU K/WcJwchb6XNFzNMjwLJlJPQG6jyTAlyYvZX7RQCi6hiBas2F1P/Oi4GDt1qWJFE0L7T ndxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=T11ORkm0; 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 mh4-20020a170906eb8400b006dbaa248d75si6089327ejb.53.2022.03.14.23.37.49; Mon, 14 Mar 2022 23:38:14 -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=T11ORkm0; 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 S239190AbiCNLkt (ORCPT + 99 others); Mon, 14 Mar 2022 07:40:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43044 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239173AbiCNLkj (ORCPT ); Mon, 14 Mar 2022 07:40:39 -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 5C7DF433A9; Mon, 14 Mar 2022 04:38:13 -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 2F959B80DC3; Mon, 14 Mar 2022 11:38:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8D3E3C340EC; Mon, 14 Mar 2022 11:38:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1647257891; bh=TL2Y6XQCURGc8QUOBoEvs5HooHQLG4mO1QPY66eFQaM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=T11ORkm0sUOt3TqpvIURfGa/CgMh3hCm1t6laeod+m+F1bf8O6hcA7Vh7RMEVIBZa +v7gSUZ7Liv1x8gzNTTsddjNhgAa/MBB3jDzXwV/47OYnui7NbigODXxDqg0qgv2XC wkvCB/PbSi1tFuy91TVfbUppKcv8I0U+saWPx2us= 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 4.19 14/30] Revert "xen-netback: remove hotplug-status once it has served its purpose" Date: Mon, 14 Mar 2022 12:34:32 +0100 Message-Id: <20220314112732.192015961@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220314112731.785042288@linuxfoundation.org> References: <20220314112731.785042288@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 | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/xen-netback/xenbus.c b/drivers/net/xen-netback/xenbus.c index 78c56149559c..6b678ab0a31f 100644 --- a/drivers/net/xen-netback/xenbus.c +++ b/drivers/net/xen-netback/xenbus.c @@ -499,6 +499,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 */ -- 2.34.1