From patchwork Wed Nov 2 17:14:43 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 16802 X-Patchwork-Delegate: sven@narfation.org Return-Path: X-Original-To: patchwork@open-mesh.org Delivered-To: patchwork@open-mesh.org Received: from open-mesh.org (localhost [IPv6:::1]) by open-mesh.org (Postfix) with ESMTP id 4C778817B7; Wed, 2 Nov 2016 18:15:10 +0100 (CET) Authentication-Results: open-mesh.org; dmarc=none header.from=narfation.org Authentication-Results: open-mesh.org; dkim=fail reason="verification failed; unprotected key" header.d=narfation.org header.i=@narfation.org header.b=YAy83y2J; dkim-adsp=fail (unprotected policy); dkim-atps=neutral Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2001:4d88:2000:7::2; helo=v3-1039.vlinux.de; envelope-from=sven@narfation.org; receiver=b.a.t.m.a.n@lists.open-mesh.org Authentication-Results: open-mesh.org; dmarc=pass header.from=narfation.org Received: from v3-1039.vlinux.de (narfation.org [IPv6:2001:4d88:2000:7::2]) by open-mesh.org (Postfix) with ESMTPS id 0C632817A9 for ; Wed, 2 Nov 2016 18:15:07 +0100 (CET) Received: from sven-desktop.home.narfation.org (p200300C593C38FF90000000000002E16.dip0.t-ipconnect.de [IPv6:2003:c5:93c3:8ff9::2e16]) by v3-1039.vlinux.de (Postfix) with ESMTPSA id 10D181100A9; Wed, 2 Nov 2016 18:15:07 +0100 (CET) Authentication-Results: v3-1039.vlinux.de; dmarc=none header.from=narfation.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=narfation.org; s=20121; t=1478106907; bh=6CI4ai0ocb0ltQPpLwNs92GCL6sGUIBQU/WRGKM/GoM=; h=From:To:Cc:Subject:Date:From; b=YAy83y2JIsOp66X2zCwKCLoAPXKhBbJnCeVsJd39gwIaorz7SWJXlPJAwBaMuwipS dVTGiDLCaMJPllfCyul6m2yYxPkWPLZGJ5xwl8rWoEuVFdSW0kSBfU1J4Ervegv8/N IAQzKzuzIsTTj7sVxrAueV2+7B2hy98VQM1K2H+w= From: Sven Eckelmann To: b.a.t.m.a.n@lists.open-mesh.org Date: Wed, 2 Nov 2016 18:14:43 +0100 Message-Id: <20161102171443.9491-1-sven@narfation.org> X-Mailer: git-send-email 2.10.2 MIME-Version: 1.0 Cc: julian@freifunk-rtk.de Subject: [B.A.T.M.A.N.] [PATCH maint] batman-adv: Revert "fix splat on disabling an interface" X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking Errors-To: b.a.t.m.a.n-bounces@lists.open-mesh.org Sender: "B.A.T.M.A.N" The commit bac7733d06fa ("batman-adv: fix splat on disabling an interface") fixed a warning but at the same time broke the rtnl function add_slave for devices which were temporarily removed. batadv_softif_slave_add requires soft_iface of and hard_iface to be NULL before it is allowed to be enslaved. But this resetting of soft_iface to NULL in batadv_hardif_disable_interface was removed with the aforementioned commit. Reported-by: Julian Labus Signed-off-by: Sven Eckelmann Cc: Linus Lüssing Acked-by: Linus Lüssing --- This is a simple revert. Linus, feel free to propose a patch to remove the "|| hard_iface->soft_iface" when you think it is safe and you've tested that it works Bug report for it can be found at https://www.open-mesh.org/issues/307 --- net/batman-adv/hard-interface.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/batman-adv/hard-interface.c b/net/batman-adv/hard-interface.c index e034afb..08ce361 100644 --- a/net/batman-adv/hard-interface.c +++ b/net/batman-adv/hard-interface.c @@ -652,6 +652,7 @@ void batadv_hardif_disable_interface(struct batadv_hard_iface *hard_iface, batadv_softif_destroy_sysfs(hard_iface->soft_iface); } + hard_iface->soft_iface = NULL; batadv_hardif_put(hard_iface); out: