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

Commit e574faa4c4 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 cmtp_del_connection()
which is waiting for the thread to exit -- deadlock.

Revert cmtp_reset_ctr to its original behavior: non-blocking signalling
for the session to terminate.

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
net/bluetooth/cmtp/capi.c
net/bluetooth/cmtp/cmtp.h
net/bluetooth/cmtp/core.c