Skip to content

Commit

Permalink
orinoco: Maintain lock until entry removed from list
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Joe Gunn authored and John W. Linville committed Mar 21, 2011
1 parent f8a22a2 commit 3bf184a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/wireless/orinoco/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 3bf184a

Please sign in to comment.