linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2.6.38-rc8-wl 1/1] orinoco: Maintain lock until entry removed from list
@ 2011-03-15 15:41 Joe Gunn
  2011-03-17  0:36 ` [Orinoco-devel] " Dave Kilroy
  0 siblings, 1 reply; 2+ messages in thread
From: Joe Gunn @ 2011-03-15 15:41 UTC (permalink / raw)
  To: orinoco-devel; +Cc: linux-wireless

Removing an entry from the scan_list should be performed while holding the lock.
Signed-off-by: Joseph J. Gunn <armadefuego@yahoo.com>
---
diff --git a/drivers/net/wireless/orinoco/main.c b/drivers/net/wireless/orinoco/main.c
index f3d396e..62c6b2b 100644
--- a/drivers/net/wireless/orinoco/main.c
+++ b/drivers/net/wireless/orinoco/main.c
@@ -1376,13 +1376,13 @@ static void orinoco_process_scan_results(struct work_struct *work)
 
 	spin_lock_irqsave(&priv->scan_lock, flags);
 	list_for_each_entry_safe(sd, temp, &priv->scan_list, list) {
-		spin_unlock_irqrestore(&priv->scan_lock, flags);
 
 		buf = sd->buf;
 		len = sd->len;
 		type = sd->type;
 
 		list_del(&sd->list);
+		spin_unlock_irqrestore(&priv->scan_lock, flags);
 		kfree(sd);
 
 		if (len > 0) {



      

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-03-17  0:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-15 15:41 [PATCH 2.6.38-rc8-wl 1/1] orinoco: Maintain lock until entry removed from list Joe Gunn
2011-03-17  0:36 ` [Orinoco-devel] " Dave Kilroy

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).