Skip to contentSkip to conversation

batman-adv: Fix double-hold of meshif when getting enabled

PATCH In review Simon Wunderlich 2 participants 2 messages Apr 9, 2025

Subsystems (3)
lore
Share & tools
lore

Simon Wunderlich

author maintainer
#0 lore raw

PATCH v2 1/1 batman-adv: Fix double-hold of meshif when getting enabled

From: Sven Eckelmann <[email protected]>

It was originally meant to replace the dev_hold with netdev_hold. But this was missed in this place and thus there was an imbalance when trying to remove the interfaces.

Fixes 00b35530811f ("batman-adv: adopt netdev_hold() / netdev_put()")
---
 net/batman-adv/hard-interface.c | 1 -
 1 file changed, 1 deletion(-)
net/batman-adv/hard-interface.c +0 -1
index f145f9662653..7cd4bdcee439 100644
@@ -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);
Signature · 1 line
2.39.5
maintainer
#1 lore raw
Quoted 1 line · On Wednesday, 9 April 2025 09:33:04 CEST Simon Wunderlich wrote:

...

I think I will just go back to bed - nothing good can come from this day.