From: Inaky Perez-Gonzalez Date: Wed, 7 Oct 2009 23:11:38 +0000 (+0900) Subject: wimax/i2400m: fix oops caused by race condition when exiting USB kthreads X-Git-Tag: v2.6.33-rc1~388^2~487^2~12 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4a78fd9a736db4c871bc8b583d66b61c38abd299;p=pandora-kernel.git wimax/i2400m: fix oops caused by race condition when exiting USB kthreads 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 --- Reading git-diff-tree failed