From: Szymon Janc Date: Tue, 18 Feb 2014 19:48:34 +0000 (+0100) Subject: Bluetooth: Print error when dropping L2CAP data X-Git-Tag: accepted/tizen/common/20141203.182822~316^2~18^2^2~46^2~120 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2c96e03def3b1ba47a5d0ec0c8ef7935a9bfb3a0;p=platform%2Fkernel%2Flinux-arm64.git Bluetooth: Print error when dropping L2CAP data 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 Signed-off-by: Marcel Holtmann --- diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c index c3bda64..6ace116 100644 --- a/net/bluetooth/l2cap_core.c +++ b/net/bluetooth/l2cap_core.c @@ -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;