Skip to content

Commit 42c5b0a

Browse files
Vudentzjhedberg
authored andcommitted
Bluetooth: L2CAP: Fix unrefing buffers that are queued
Processing of data received on dynamic channels is still done via syswq so the buffer shall not be unrefed when they are queued. Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
1 parent 3f43413 commit 42c5b0a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

subsys/bluetooth/host/l2cap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1676,6 +1676,7 @@ static void l2cap_chan_recv(struct bt_l2cap_chan *chan, struct net_buf *buf)
16761676
BT_DBG("chan %p len %u", chan, buf->len);
16771677

16781678
chan->ops->recv(chan, buf);
1679+
net_buf_unref(buf);
16791680
}
16801681

16811682
void bt_l2cap_recv(struct bt_conn *conn, struct net_buf *buf)
@@ -1709,7 +1710,6 @@ void bt_l2cap_recv(struct bt_conn *conn, struct net_buf *buf)
17091710
}
17101711

17111712
l2cap_chan_recv(chan, buf);
1712-
net_buf_unref(buf);
17131713
}
17141714

17151715
int bt_l2cap_update_conn_param(struct bt_conn *conn,

0 commit comments

Comments
 (0)