]> git.baikalelectronics.ru Git - kernel.git/commit
Bluetooth: bnep: Fix deadlock in session deletion
authorPeter Hurley <peter@hurleysoftware.com>
Fri, 5 Aug 2011 14:41:35 +0000 (10:41 -0400)
committerGustavo F. Padovan <padovan@profusion.mobi>
Thu, 11 Aug 2011 22:50:27 +0000 (19:50 -0300)
commit423646d670a7974435e571e437f75a0e26f4d348
tree958b4624a551577f68e0f0e357112637a10c520a
parentd1f0cb7cfbba18da45b58a3cd5bcf37be587ed5e
Bluetooth: bnep: Fix deadlock in session deletion

Commit 5379efdc9f 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