From: <wey-yi.w.guy@intel.com>
To: johannes@sipsolutions.net
Cc: linux-wireless@vger.kernel.org, Wey-Yi Guy <wey-yi.w.guy@intel.com>
Subject: [PATCH 1/1] mac80211: only single mutex locked to prevent deadlock
Date: Mon, 25 Jan 2010 10:12:16 -0800 [thread overview]
Message-ID: <1264443136-30865-1-git-send-email-wey-yi.w.guy@intel.com> (raw)
From: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Both ifmgd->mtx and sdata->local->iflist_mtx are locked in
ieee80211_mgd_probe_ap(), not sure it will cause deadlock condition. but
it is better to only has one mutex at a time.
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
---
net/mac80211/mlme.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 1e1d16c..e23df14 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -914,10 +914,13 @@ static void ieee80211_mgd_probe_ap(struct ieee80211_sub_if_data *sdata,
if (already)
goto out;
+ mutex_unlock(&ifmgd->mtx);
+
mutex_lock(&sdata->local->iflist_mtx);
ieee80211_recalc_ps(sdata->local, -1);
mutex_unlock(&sdata->local->iflist_mtx);
+ mutex_lock(&ifmgd->mtx);
ifmgd->probe_send_count = 0;
ieee80211_mgd_probe_ap_send(sdata);
out:
--
1.5.6.3
next reply other threads:[~2010-01-25 18:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-25 18:12 wey-yi.w.guy [this message]
2010-01-25 18:23 ` [PATCH 1/1] mac80211: only single mutex locked to prevent deadlock Johannes Berg
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=1264443136-30865-1-git-send-email-wey-yi.w.guy@intel.com \
--to=wey-yi.w.guy@intel.com \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
/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