aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/l2cap_core.c
diff options
context:
space:
mode:
authorSzymon Janc <szymon.janc@tieto.com>2012-01-11 04:59:49 -0500
committerJohan Hedberg <johan.hedberg@intel.com>2012-02-13 10:01:26 -0500
commit09bfb2ee52a66845bbefad0b6eaeae1b5adea949 (patch)
tree5890823d08a054114bbbfc750425b279b1cefef5 /net/bluetooth/l2cap_core.c
parent77f918bc7babb8473933ca0a6deefc64fe24b06c (diff)
Bluetooth: Drop L2CAP chan reference if ERTM ack_timer fired
Reference counter was incremented when starting ack timer but decremented only when clearing timer, not when timer fired. Signed-off-by: Szymon Janc <szymon.janc@tieto.com> Acked-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'net/bluetooth/l2cap_core.c')
-rw-r--r--net/bluetooth/l2cap_core.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index 778ceb2b8402..6773453927ef 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -1996,6 +1996,8 @@ static void l2cap_ack_timeout(struct work_struct *work)
1996 lock_sock(chan->sk); 1996 lock_sock(chan->sk);
1997 __l2cap_send_ack(chan); 1997 __l2cap_send_ack(chan);
1998 release_sock(chan->sk); 1998 release_sock(chan->sk);
1999
2000 l2cap_chan_put(chan);
1999} 2001}
2000 2002
2001static inline void l2cap_ertm_init(struct l2cap_chan *chan) 2003static inline void l2cap_ertm_init(struct l2cap_chan *chan)