All of lore.kernel.org
 help / color / mirror / Atom feed
From: Milan Plzik <milan.plzik@gmail.com>
To: linux-wireless@vger.kernel.org
Subject: [PATCH 1/7] Fix possible mutex double-locking
Date: Fri, 04 Jul 2008 19:43:51 +0200	[thread overview]
Message-ID: <20080704174350.4996.72931.stgit@localhost> (raw)

After finishing scan, at76_dwork_hw_scan locks priv->mtx and calls
ieee80211_scan_completed, which in turn can possibly call at76_config,
which tries to lock the mutex again.

Signed-off-by: Milan Plzik <milan.plzik@gmail.com>
---

 drivers/net/wireless/at76_usb.c |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/net/wireless/at76_usb.c b/drivers/net/wireless/at76_usb.c
index eab8f16..dc6edb3 100644
--- a/drivers/net/wireless/at76_usb.c
+++ b/drivers/net/wireless/at76_usb.c
@@ -1897,8 +1897,6 @@ static void at76_dwork_hw_scan(struct work_struct *work)
 					      dwork_hw_scan.work);
 	int ret;
 
-	mutex_lock(&priv->mtx);
-
 	ret = at76_get_cmd_status(priv->udev, CMD_SCAN);
 	at76_dbg(DBG_MAC80211, "%s: CMD_SCAN status 0x%02x", __func__, ret);
 
@@ -1909,16 +1907,16 @@ static void at76_dwork_hw_scan(struct work_struct *work)
 				   SCAN_POLL_INTERVAL);
 		goto exit;
 	}
-
+	
 	ieee80211_scan_completed(priv->hw);
 
 	if (is_valid_ether_addr(priv->bssid))
 		at76_join(priv);
 
-	ieee80211_wake_queues(priv->hw);
+// CHECKME:	ieee80211_wake_queues(priv->hw);
 
 exit:
-	mutex_unlock(&priv->mtx);
+	return;
 }
 
 static int at76_hw_scan(struct ieee80211_hw *hw, u8 *ssid, size_t len)


             reply	other threads:[~2008-07-04 17:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-04 17:43 Milan Plzik [this message]
2008-07-04 17:44 ` [PATCH 2/7] Don't leave queues stopped when not neccessary Milan Plzik
2008-07-04 17:44 ` [PATCH 3/7] Remove usage of data which were already skb_pull-ed Milan Plzik
2008-07-04 17:44 ` [PATCH 4/7] Some at76-based devices don't include FCS in received frames Milan Plzik
2008-07-04 17:44 ` [PATCH 5/7] Minor final fixes Milan Plzik
2008-07-04 17:44 ` [PATCH 6/7] Adds support for WEP operation with 1.103.x firmware Milan Plzik
2008-07-04 17:44 ` [PATCH 7/7] Add WPA support for 1.103 firmware Milan Plzik

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=20080704174350.4996.72931.stgit@localhost \
    --to=milan.plzik@gmail.com \
    --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 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.