mac80211: Deactivate mesh path timers when freeing nodes
authorJavier Cardona <javier@cozybit.com>
Fri, 13 May 2011 21:16:07 +0000 (14:16 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 16 May 2011 18:25:28 +0000 (14:25 -0400)
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 <johannes@sipsolutions.net>
Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/mesh_pathtbl.c

index 0aa96cd6bd273b78bf32275e9d1a3a3975c29202..f775202552e590a8c8c6cdedcbac893c550652f9 100644 (file)
@@ -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);
 }