]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
Bluetooth: Print error when dropping L2CAP data
authorSzymon Janc <szymon.janc@gmail.com>
Tue, 18 Feb 2014 19:48:34 +0000 (20:48 +0100)
committerMarcel Holtmann <marcel@holtmann.org>
Tue, 18 Feb 2014 20:11:47 +0000 (12:11 -0800)
Silently dropping L2CAP data (i.e. due to remote device not obeying
negotiated MTU) is confusing and makes debugging harder.

Signed-off-by: Szymon Janc <szymon.janc@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/l2cap_core.c

index c3bda6445f3d7e02598a510acb262780e7385645..6ace116f3b394ec8b83e5751694318f736254da1 100644 (file)
@@ -6776,8 +6776,10 @@ static void l2cap_data_channel(struct l2cap_conn *conn, u16 cid,
                 * But we don't have any other choice. L2CAP doesn't
                 * provide flow control mechanism. */
 
-               if (chan->imtu < skb->len)
+               if (chan->imtu < skb->len) {
+                       BT_ERR("Dropping L2CAP data: receive buffer overflow");
                        goto drop;
+               }
 
                if (!chan->ops->recv(chan, skb))
                        goto done;