]> git.baikalelectronics.ru Git - kernel.git/commit
Bluetooth: Clear RFCOMM session timer when disconnecting last channel
authorMat Martineau <mathewm@codeaurora.org>
Wed, 7 Dec 2011 00:23:26 +0000 (16:23 -0800)
committerGustavo F. Padovan <padovan@profusion.mobi>
Mon, 19 Dec 2011 00:29:35 +0000 (22:29 -0200)
commitf9936b1d86f70527f4fa9c0f624c01579eb36797
treec1a498c2af15b6df2387898ac260c84f4a4dbbd1
parent5938afc682ae2d1310905139ade38d955b8c5ff2
Bluetooth: Clear RFCOMM session timer when disconnecting last channel

When the last RFCOMM data channel is closed, a timer is normally set
up to disconnect the control channel at a later time.  If the control
channel disconnect command is sent with the timer pending, the timer
needs to be cancelled.

If the timer is not cancelled in this situation, the reference
counting logic for the RFCOMM session does not work correctly when the
remote device closes the L2CAP connection.  The session is freed at
the wrong time, leading to a kernel panic.

Signed-off-by: Mat Martineau <mathewm@codeaurora.org>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
net/bluetooth/rfcomm/core.c