From: Javier Cardona Date: Fri, 13 May 2011 21:16:07 +0000 (-0700) Subject: mac80211: Deactivate mesh path timers when freeing nodes X-Git-Tag: v3.0~349^2~16^2~57 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d0df9eecf9f61f70fd847656f5eb113e06e46a03;p=platform%2Fkernel%2Flinux-amlogic.git 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. Reported-by: Johannes Berg Signed-off-by: Javier Cardona Signed-off-by: John W. Linville --- diff --git a/net/mac80211/mesh_pathtbl.c b/net/mac80211/mesh_pathtbl.c index 0aa96cd..f775202 100644 --- a/net/mac80211/mesh_pathtbl.c +++ b/net/mac80211/mesh_pathtbl.c @@ -719,8 +719,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); }