Bluetooth: bnep: Fix deadlock in session deletion
authorPeter Hurley <peter@hurleysoftware.com>
Fri, 5 Aug 2011 14:41:35 +0000 (10:41 -0400)
committermgross <mark.gross@intel.com>
Wed, 9 Nov 2011 20:22:46 +0000 (12:22 -0800)
commit33caec0bedaeb76ad6ae921e26b9037e451a8945
tree93ddb1a09b407bb0c060cddcd9dcc62c2be24060
parent39970b6a457d7db568ff1ebd87c987f9f264422a
Bluetooth: bnep: Fix deadlock in session deletion

Commit f4d7cd4a4c introduced the usage of kthread API.
kthread_stop is a blocking function which returns only when
the thread exits. In this case, the thread can't exit because it's
waiting for the write lock, which is being held by bnep_del_connection()
which is waiting for the thread to exit -- deadlock.

Use atomic_t/wake_up_process instead to signal to the thread to exit.

Signed-off-by: Jaikumar Ganesh <jaikumar@google.com>
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
net/bluetooth/bnep/bnep.h
net/bluetooth/bnep/core.c