aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoe Gunn <armadefuego@yahoo.com>2011-03-15 11:41:19 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-03-21 15:18:34 -0400
commit3bf184a7e96ff21965fa524260f60af8ab4d9133 (patch)
tree5be4cd1f9265418f09a0fcfadc42277060013712
parentf8a22a2b165c79a46e275097fcadab7fd151c504 (diff)
orinoco: Maintain lock until entry removed from list
Removing an entry from the scan_list should be performed while holding the lock. Signed-off-by: Joseph J. Gunn <armadefuego@yahoo.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/orinoco/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/orinoco/main.c b/drivers/net/wireless/orinoco/main.c
index f3d396e7544b..62c6b2b37dbe 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)
1376 1376
1377 spin_lock_irqsave(&priv->scan_lock, flags); 1377 spin_lock_irqsave(&priv->scan_lock, flags);
1378 list_for_each_entry_safe(sd, temp, &priv->scan_list, list) { 1378 list_for_each_entry_safe(sd, temp, &priv->scan_list, list) {
1379 spin_unlock_irqrestore(&priv->scan_lock, flags);
1380 1379
1381 buf = sd->buf; 1380 buf = sd->buf;
1382 len = sd->len; 1381 len = sd->len;
1383 type = sd->type; 1382 type = sd->type;
1384 1383
1385 list_del(&sd->list); 1384 list_del(&sd->list);
1385 spin_unlock_irqrestore(&priv->scan_lock, flags);
1386 kfree(sd); 1386 kfree(sd);
1387 1387
1388 if (len > 0) { 1388 if (len > 0) {