Skip to contentSkip to conversation

mac80211: Deactivate mesh path timers when freeing nodes

PATCH New Javier Cardona 1 participant 1 message May 13, 2011 mac80211

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mac80211: Deactivate mesh path timers when freeing nodes

Mesh paths are deleted via mesh_path_del() which properly deactivates the timer associated to a mesh path. But if paths were deleted by mesh_table_free(..., true) timers would not be deactivated. This fixes this case.

---
 net/mac80211/mesh_pathtbl.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
net/mac80211/mesh_pathtbl.c +3 -1
index a1d59bd..2a0302a 100644
@@ -673,8 +673,10 @@ static void mesh_path_node_free(struct hlist_node *p, bool free_leafs)
 	struct mpath_node *node = hlist_entry(p, struct mpath_node, list);
 	mpath = node->mpath;
 	hlist_del_rcu(p);
-	if (free_leafs)
+	if (free_leafs) {
+		del_timer_sync(&mpath->timer);
 		kfree(mpath);
+	}
 	kfree(node);
 }
 
Signature · 1 line
1.7.1