wimax/i2400m: fix oops caused by race condition when exiting USB kthreads
authorInaky Perez-Gonzalez <inaky@linux.intel.com>
Wed, 7 Oct 2009 23:11:38 +0000 (08:11 +0900)
committerInaky Perez-Gonzalez <inaky@linux.intel.com>
Mon, 19 Oct 2009 06:56:22 +0000 (15:56 +0900)
Current i2400m USB code had to threads (one for processing RX, one for
TX). When calling i2400m_{tx,rx}_release(), it would crash if the
thread had exited already due to an error.

So changed the code to have the thread fill in/out
i2400mu->{tx,rx}_kthread under a spinlock; then the _release()
function will call kthread_stop() only if {rx,tx}_kthread is still
set.

Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>

No differences found