]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
Bluetooth: __l2cap_wait_ack() add defensive timeout
authorDean Jenkins <Dean_Jenkins@mentor.com>
Tue, 23 Jun 2015 16:59:39 +0000 (17:59 +0100)
committerMarcel Holtmann <marcel@holtmann.org>
Thu, 23 Jul 2015 15:10:51 +0000 (17:10 +0200)
commite432c72c464d2deb6c66d1e2a5f548dc1f0ef4dc
tree1206dfbdbb74bf9b5ffa8bf9999b824761cea681
parentcb02a25583b59ce48267472cd092485d754964f9
Bluetooth: __l2cap_wait_ack() add defensive timeout

Add a timeout to prevent the do while loop running in an
infinite loop. This ensures that the channel will be
instructed to close within 10 seconds so prevents
l2cap_sock_shutdown() getting stuck forever.

Returns -ENOLINK when the timeout is reached. The channel
will be subequently closed and not all data will be ACK'ed.

Signed-off-by: Dean Jenkins <Dean_Jenkins@mentor.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
include/net/bluetooth/l2cap.h
net/bluetooth/l2cap_sock.c