Skip to content
Commit 850a28ec authored by Vasily Khoruzhick's avatar Vasily Khoruzhick Committed by Grant Likely
Browse files

spi: Fix race condition in stop_queue()



There's a race condition in stop_queue() in some drivers -
if drv_data->queue is empty, but drv_data->busy is still set
(or opposite situation) stop_queue will return -EBUSY.
So fix loop condition to check that both drv_data->queue is empty
and drv_data->busy is not set.

This patch affects following drivers:
pxa2xx_spi
spi_bfin5xx
amba-pl022
dw_spi

Signed-off-by: default avatarVasily Khoruzhick <anarsoul@gmail.com>
Acked-by: default avatarEric Miao <eric.y.miao@gmail.com>
Acked-by: default avatarMike Frysinger <vapier@gentoo.org>
Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
parent 454abcc5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment