]> git.karo-electronics.de Git - karo-tx-linux.git/commit
Bluetooth: Make better use of l2cap_chan reference counting
authorMat Martineau <mathewm@codeaurora.org>
Fri, 27 Apr 2012 23:50:50 +0000 (16:50 -0700)
committerGustavo Padovan <gustavo@padovan.org>
Sun, 29 Apr 2012 20:27:45 +0000 (17:27 -0300)
commit7f4ac3fd9b02d712ba8b009017ecbe8a29fe01ba
tree033fae687edcb6e0ff157e6a44989abdf58bbfc2
parentfb872142dca29fa847c53f51abe589af6a8fcec3
Bluetooth: Make better use of l2cap_chan reference counting

L2CAP sockets contain a pointer to l2cap_chan that needs to be
reference counted in order to prevent a possible dangling pointer when
the channel is freed.

There were a few other cases where an l2cap_chan pointer on the stack
was dereferenced after a call to l2cap_chan_del. Those pointers are
also now reference counted.

Signed-off-by: Mat Martineau <mathewm@codeaurora.org>
Signed-off-by: Gustavo Padovan <gustavo@padovan.org>
net/bluetooth/l2cap_core.c
net/bluetooth/l2cap_sock.c