From: Sven Eckelmann Date: Wed, 2 Nov 2016 17:14:43 +0000 (+0100) Subject: batman-adv: Revert "fix splat on disabling an interface" X-Git-Tag: v4.9-rc7~33^2~6^2~1 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=27915aa61060fd8954a68a86657784705955088a;p=users%2Fjedix%2Flinux-maple.git batman-adv: Revert "fix splat on disabling an interface" The commit 9799c50372b2 ("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 Acked-by: Linus Lüssing Signed-off-by: Simon Wunderlich --- diff --git a/net/batman-adv/hard-interface.c b/net/batman-adv/hard-interface.c index e034afbd1bb02..08ce36147c4c3 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: