aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJavier Cardona <javier@cozybit.com>2011-05-13 14:16:07 -0700
committerJohn W. Linville <linville@tuxdriver.com>2011-05-16 14:25:28 -0400
commitd0df9eecf9f61f70fd847656f5eb113e06e46a03 (patch)
tree8604356c13dec2d3c42b7b6367a64d42fd7a7bfd
parent011159a0a746e03ae42d559ce5c2a70138da3129 (diff)
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 <johannes@sipsolutions.net> Signed-off-by: Javier Cardona <javier@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--net/mac80211/mesh_pathtbl.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/mac80211/mesh_pathtbl.c b/net/mac80211/mesh_pathtbl.c
index 0aa96cd6bd2..f775202552e 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);
}