mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-22 20:23:57 +08:00
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>
This commit is contained in:
parent
f8a22a2b16
commit
3bf184a7e9
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user