batman-adv: Revert "fix splat on disabling an interface"
Sven Eckelmann
maintainerPATCH 1/1 batman-adv: Revert "fix splat on disabling an interface"
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.
---
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(+)
net/batman-adv/hard-interface.c +1 -0
@@ -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:
Signature · 1 line
2.10.2
Quoted 9 lines · Sven Eckelmann
The commit
bac7733d06fa("batman-adv: fix splat on disabling an interface") fixed a warning but at the same time broke the rtnl functionadd_slavefor devices which were temporarily removed.
batadv_softif_slave_addrequiressoft_ifaceof andhard_ifaceto be NULL before it is allowed to be enslaved. But this resetting ofsoft_ifaceto NULL inbatadv_hardif_disable_interfacewas removed with the aforementioned commit.
Quoted 4 lines
Reported-by Julian Labus <[email protected]>Signed-off-by Sven Eckelmann <[email protected]>Cc Linus Lüssing <[email protected]>---
Like I said in the ticket, I can't reproduce the splat with v2016.4 plus this revert right now.
Maybe changes to the hard-interface handling might have fixed it properly in the mean time.
Quoted 18 lines · On Mittwoch, 2. November 2016 18:14:43 CET Sven Eckelmann wrote:
The commit
bac7733d06fa("batman-adv: fix splat on disabling an interface") fixed a warning but at the same time broke the rtnl functionadd_slavefor devices which were temporarily removed.
batadv_softif_slave_addrequiressoft_ifaceof andhard_ifaceto be NULL before it is allowed to be enslaved. But this resetting ofsoft_ifaceto NULL inbatadv_hardif_disable_interfacewas removed with the aforementioned commit.Reported-by Julian Labus <[email protected]>Signed-off-by Sven Eckelmann <[email protected]>Cc Linus Lüssing <[email protected]>Acked-by Linus Lüssing <[email protected]>---
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
Quoted 4 lines
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(+)
Applied in 89d0e31c2cc790743ee373b717c05ca85caf8384 [1].
Kind regards,
Sven
[1] https://git.open-mesh.org/batman-adv.git/commit/89d0e31c2cc790743ee373b717c05ca85caf8384