]> git.karo-electronics.de Git - linux-beck.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)
commit7176522cdca1f0b78a1434b41761f0334511822a
tree58ec3c3fc712536e898bd2d7780361e8a492f22a
parent751c10a56802513a6b057c8cf1552cecc1c9afde
Bluetooth: cmtp: Fix deadlock in session deletion

Commit fada4ac339 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