Commit 3bf184a7 authored by Joe Gunn's avatar Joe Gunn Committed by John W. Linville

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: default avatarJoseph J. Gunn <armadefuego@yahoo.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent f8a22a2b
...@@ -1376,13 +1376,13 @@ static void orinoco_process_scan_results(struct work_struct *work) ...@@ -1376,13 +1376,13 @@ static void orinoco_process_scan_results(struct work_struct *work)
spin_lock_irqsave(&priv->scan_lock, flags); spin_lock_irqsave(&priv->scan_lock, flags);
list_for_each_entry_safe(sd, temp, &priv->scan_list, list) { list_for_each_entry_safe(sd, temp, &priv->scan_list, list) {
spin_unlock_irqrestore(&priv->scan_lock, flags);
buf = sd->buf; buf = sd->buf;
len = sd->len; len = sd->len;
type = sd->type; type = sd->type;
list_del(&sd->list); list_del(&sd->list);
spin_unlock_irqrestore(&priv->scan_lock, flags);
kfree(sd); kfree(sd);
if (len > 0) { if (len > 0) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment