This patch add a atomic lock in usb_tranzport_usb for preventing a tiny race in this function. Signed-off-by: Nicholas Krause <xerofoify@xxxxxxxxx> --- drivers/staging/frontier/tranzport.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/frontier/tranzport.c b/drivers/staging/frontier/tranzport.c index 2f86163..9df866f 100644 --- a/drivers/staging/frontier/tranzport.c +++ b/drivers/staging/frontier/tranzport.c @@ -532,8 +532,7 @@ static ssize_t usb_tranzport_read(struct file *file, char __user *buffer, retval = -EAGAIN; goto unlock_exit; } - /* tiny race - FIXME: make atomic? */ - /* atomic_cmp_exchange(&dev->interrupt_in_done, 0 , 0); */ + atomic_cmp_exchange(&dev->interrupt_in_done , 0 , 0); dev->interrupt_in_done = 0; retval = wait_event_interruptible(dev->read_wait, dev->interrupt_in_done); -- 1.9.1 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel