staging: comedi: usbduxsigma: set *_cmd_running flags before submitting urbs
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Thu, 25 Jul 2013 23:21:13 +0000 (16:21 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 26 Jul 2013 22:05:04 +0000 (15:05 -0700)
commit9c922a9076afd9e483bc17d768ed813d2f76f7cb
tree42da3cd17a9627903d2959f3da903a01fad63dda
parentb07dee7c9aa78e9b55e0b4ecdba622db55a99ffe
staging: comedi: usbduxsigma: set *_cmd_running flags before submitting urbs

As pointed out by Ian Abbott, the *_cmd_running flags should be set
before submitting the urbs. There is a possible race condition where
an urb could complete and the flag is checked in the completion
routine before it's set.

Reported-by: Ian Abbott <abbotti@mev.co.uk>
Acked-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/usbduxsigma.c