All of lore.kernel.org
 help / color / mirror / Atom feed
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 3/8] mac80211: mesh locking fixes
Date: Tue,  9 Aug 2011 16:45:06 -0700	[thread overview]
Message-ID: <1312933511-9486-4-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>

mesh_queue_preq is invoked invoked from both user (work queue) and
softirq (timer) context, so the _bh version of spinlock needs to be
used. Also, the mpath->state_lock should be softirq safe as well.

Signed-off-by: Javier Cardona <javier@cozybit.com>
---
 net/mac80211/mesh_pathtbl.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/mac80211/mesh_pathtbl.c b/net/mac80211/mesh_pathtbl.c
index 89f469b..b4480a9 100644
--- a/net/mac80211/mesh_pathtbl.c
+++ b/net/mac80211/mesh_pathtbl.c
@@ -654,12 +654,12 @@ int mesh_path_del(u8 *addr, struct ieee80211_sub_if_data *sdata)
 		mpath = node->mpath;
 		if (mpath->sdata == sdata &&
 		    memcmp(addr, mpath->dst, ETH_ALEN) == 0) {
-			spin_lock(&mpath->state_lock);
+			spin_lock_bh(&mpath->state_lock);
 			mpath->flags |= MESH_PATH_RESOLVING;
 			hlist_del_rcu(&node->list);
 			call_rcu(&node->rcu, mesh_path_node_reclaim);
 			atomic_dec(&tbl->entries);
-			spin_unlock(&mpath->state_lock);
+			spin_unlock_bh(&mpath->state_lock);
 			goto enddel;
 		}
 	}
-- 
1.7.6


  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 ` [PATCH 2/8] mac80211: fix mpath timer NULL function Thomas Pedersen
2011-08-10 13:39   ` Johannes Berg
2011-08-09 23:45 ` Thomas Pedersen [this message]
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-4-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.