From: Thomas Pedersen <thomas@cozybit.com>
To: linux-wireless@vger.kernel.org
Cc: Javier Cardona <javier@cozybit.com>,
johannes@sipsolutions.net, linville@tuxdriver.com
Subject: [PATCH 2/8] mac80211: fix mpath timer NULL function
Date: Tue, 9 Aug 2011 16:45:05 -0700 [thread overview]
Message-ID: <1312933511-9486-3-git-send-email-thomas@cozybit.com> (raw)
In-Reply-To: <1312933511-9486-1-git-send-email-thomas@cozybit.com>
From: Javier Cardona <javier@cozybit.com>
If we have an mpath whose timer has not been initialized, don't try to
delete it.
Signed-off-by: Javier Cardona <javier@cozybit.com>
---
net/mac80211/mesh_pathtbl.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/net/mac80211/mesh_pathtbl.c b/net/mac80211/mesh_pathtbl.c
index 819d8e4..89f469b 100644
--- a/net/mac80211/mesh_pathtbl.c
+++ b/net/mac80211/mesh_pathtbl.c
@@ -619,7 +619,8 @@ static void mesh_path_node_reclaim(struct rcu_head *rp)
struct mpath_node *node = container_of(rp, struct mpath_node, rcu);
struct ieee80211_sub_if_data *sdata = node->mpath->sdata;
- del_timer_sync(&node->mpath->timer);
+ if (node->mpath->timer.function)
+ del_timer_sync(&node->mpath->timer);
atomic_dec(&sdata->u.mesh.mpaths);
kfree(node->mpath);
kfree(node);
@@ -768,7 +769,8 @@ static void mesh_path_node_free(struct hlist_node *p, bool free_leafs)
mpath = node->mpath;
hlist_del_rcu(p);
if (free_leafs) {
- del_timer_sync(&mpath->timer);
+ if (mpath->timer.function)
+ del_timer_sync(&mpath->timer);
kfree(mpath);
}
kfree(node);
--
1.7.6
next prev parent reply other threads:[~2011-08-09 23:46 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-09 23:45 [PATCH 0/8] mac80211: add mesh gate forwarding Thomas Pedersen
2011-08-09 23:45 ` [PATCH 1/8] mac80211: improve mpath debugging Thomas Pedersen
2011-08-10 13:38 ` Johannes Berg
2011-08-10 20:11 ` Thomas Pedersen
2011-08-10 20:14 ` Johannes Berg
2011-08-10 20:40 ` Thomas Pedersen
2011-08-09 23:45 ` Thomas Pedersen [this message]
2011-08-10 13:39 ` [PATCH 2/8] mac80211: fix mpath timer NULL function Johannes Berg
2011-08-09 23:45 ` [PATCH 3/8] mac80211: mesh locking fixes Thomas Pedersen
2011-08-09 23:45 ` [PATCH 4/8] mac80211: fix mesh path flushing Thomas Pedersen
2011-08-09 23:45 ` [PATCH 5/8] mac80211: mesh gate implementation Thomas Pedersen
2011-08-10 13:41 ` Johannes Berg
2011-08-09 23:45 ` [PATCH 6/8] {nl,mac}80211: add missing root mode meshconf entries Thomas Pedersen
2011-08-09 23:45 ` [PATCH 7/8] {nl,cfg,mac}80211: let userspace set RANN interval Thomas Pedersen
2011-08-10 13:47 ` Johannes Berg
2011-08-09 23:45 ` [PATCH 8/8] {nl,cfg,mac}80211: let userspace make meshif mesh gate Thomas Pedersen
2011-08-10 13:47 ` Johannes Berg
2011-08-10 21:31 ` Thomas Pedersen
2011-08-12 9:31 ` Johannes Berg
2011-08-12 19:00 ` Thomas Pedersen
2011-08-12 19:03 ` Johannes Berg
2011-08-12 19:26 ` Javier Cardona
2011-08-12 2:53 ` [PATCH v2 1/8] mac80211: improve mpath debugging Thomas Pedersen
2011-08-12 2:53 ` [PATCH v2 2/8] mac80211: fix mpath timer removal Thomas Pedersen
2011-08-12 2:53 ` [PATCH v2 3/8] mac80211: mesh locking fixes Thomas Pedersen
2011-08-12 2:53 ` [PATCH v2 4/8] mac80211: fix mesh path flushing Thomas Pedersen
2011-08-12 2:53 ` [PATCH v2 5/8] mac80211: mesh gate implementation Thomas Pedersen
2011-08-12 2:53 ` [PATCH v2 6/8] {nl,mac}80211: add missing root mode debugfs entries Thomas Pedersen
2011-08-12 2:54 ` [PATCH v2 7/8] {nl,cfg,mac}80211: let userspace set RANN interval Thomas Pedersen
2011-08-12 2:54 ` [PATCH v2 8/8] {nl,cfg,mac}80211: let userspace make meshif mesh gate Thomas Pedersen
2011-08-12 12:28 ` [PATCH v2 1/8] mac80211: improve mpath debugging Johannes Berg
2011-08-12 18:12 ` Thomas Pedersen
2011-08-22 18:34 ` John W. Linville
2011-08-22 21:57 ` Thomas Pedersen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1312933511-9486-3-git-send-email-thomas@cozybit.com \
--to=thomas@cozybit.com \
--cc=javier@cozybit.com \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).