The following commit has been merged in the master branch:
commit 10a77965760c6e2b3eef483be33ae407004df894
Author: Sven Eckelmann <[email protected]>
Date:   Mon Apr 14 20:05:37 2025 +0200

    batman-adv: Fix double-hold of meshif when getting enabled
    
    It was originally meant to replace the dev_hold with netdev_hold. But this
    was missed in batadv_hardif_enable_interface(). As result, there was an
    imbalance and a hang when trying to remove the mesh-interface with
    (previously) active hard-interfaces:
    
      unregister_netdevice: waiting for batadv0 to become free. Usage count = 3
    
    Fixes: 00b35530811f ("batman-adv: adopt netdev_hold() / netdev_put()")
    Suggested-by: Eric Dumazet <[email protected]>
    Reported-by: [email protected]
    Reported-by: [email protected]
    Reported-by: [email protected]
    Reported-by: [email protected]
    Reported-by: [email protected]
    Signed-off-by: Sven Eckelmann <[email protected]>
    Reviewed-by: Eric Dumazet <[email protected]>
    Link: 
https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>

diff --git a/net/batman-adv/hard-interface.c b/net/batman-adv/hard-interface.c
index f145f96626531..7cd4bdcee4393 100644
--- a/net/batman-adv/hard-interface.c
+++ b/net/batman-adv/hard-interface.c
@@ -725,7 +725,6 @@ int batadv_hardif_enable_interface(struct batadv_hard_iface 
*hard_iface,
 
        kref_get(&hard_iface->refcount);
 
-       dev_hold(mesh_iface);
        netdev_hold(mesh_iface, &hard_iface->meshif_dev_tracker, GFP_ATOMIC);
        hard_iface->mesh_iface = mesh_iface;
        bat_priv = netdev_priv(hard_iface->mesh_iface);

-- 
LinuxNextTracking

Reply via email to