From 3bf184a7e96ff21965fa524260f60af8ab4d9133 Mon Sep 17 00:00:00 2001 From: Joe Gunn Date: Tue, 15 Mar 2011 08:41:19 -0700 Subject: [PATCH] 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 Signed-off-by: John W. Linville --- drivers/net/wireless/orinoco/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) 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) {