staging: vt6656: [BUG] main_usb.c oops on device_close move flag earlier.
authorMalcolm Priestley <tvboxspy@gmail.com>
Sun, 22 Sep 2013 18:48:54 +0000 (19:48 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 25 Sep 2013 23:53:40 +0000 (16:53 -0700)
commite3eb270fab7734427dd8171a93e4946fe28674bc
tree827ab950202b2d8367b6692e50e44db4df8e603a
parent18e35e081e1bb129c6dc5a5874c260a613cd13d7
staging: vt6656: [BUG] main_usb.c oops on device_close move flag earlier.

The vt6656 is prone to resetting on the usb bus.

It seems there is a race condition and wpa supplicant is
trying to open the device via iw_handlers before its actually
closed at a stage that the buffers are being removed.

The device is longer considered open when the
buffers are being removed. So move ~DEVICE_FLAGS_OPENED
flag to before freeing the device buffers.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vt6656/main_usb.c