Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cf043172 authored by Franky Lin's avatar Franky Lin Committed by John W. Linville
Browse files

brcmfmac: fix a double spin_unlock_irqrestore issue in dpc



dpc_tl_lock is not acquired in the error handle code for bus down.
But it's unlocked using spin_unlock_irqrestore after finishing task
list walk down. Grab the lock before breaking the loop to avoid a
double unlock.

Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarFranky Lin <frankyl@broadcom.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 66f2c99a
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -2637,6 +2637,7 @@ static int brcmf_sdbrcm_dpc_thread(void *data)
				/* after stopping the bus, exit thread */
				brcmf_sdbrcm_bus_stop(bus->sdiodev->dev);
				bus->dpc_tsk = NULL;
				spin_lock_irqsave(&bus->dpc_tl_lock, flags);
				break;
			}