When enabling an hard_iface for the first time, the hard_iface->soft_iface member is initialised with the newly created soft_iface. However, in case of error during the activation procedure this member has to be set to NULL again, otherwise the hard_iface will result busy and will not be possible to use it anymore
This issue has been introduced with edd08535c00a42143989118bc999060893ce0a41 ("batman-adv: Allow to modify slaves of soft-interfaces through rntl_link")
Signed-off-by: Antonio Quartulli ordex@autistici.org ---
v2: - based on next (the commi introducing the problem is in next, not in maint) - added "introduced-by" in the commit message
hard-interface.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/hard-interface.c b/hard-interface.c index fd99e42..b69fe11 100644 --- a/hard-interface.c +++ b/hard-interface.c @@ -410,6 +410,7 @@ out: err_upper: netdev_upper_dev_unlink(hard_iface->net_dev, soft_iface); err_dev: + hard_iface->soft_iface = NULL; dev_put(soft_iface); err: batadv_hardif_free_ref(hard_iface);