Skip to content

Commit ee93053

Browse files
martintownsendholtmann
authored andcommitted
Bluetooth: Fix missing channel unlock in l2cap_le_credits
In the error case where credits is greater than max_credits there is a missing l2cap_chan_unlock before returning. Signed-off-by: Martin Townsend <mtownsend1973@gmail.com> Tested-by: Jukka Rissanen <jukka.rissanen@linux.intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
1 parent 11e3ff7 commit ee93053

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎net/bluetooth/l2cap_core.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5492,6 +5492,7 @@ static inline int l2cap_le_credits(struct l2cap_conn *conn,
54925492
if (credits > max_credits) {
54935493
BT_ERR("LE credits overflow");
54945494
l2cap_send_disconn_req(chan, ECONNRESET);
5495+
l2cap_chan_unlock(chan);
54955496

54965497
/* Return 0 so that we don't trigger an unnecessary
54975498
* command reject packet.

0 commit comments

Comments
 (0)