diff mbox series

Bluetooth: L2CAP: Fix missing unlock in l2cap_conless_channel

Message ID 7f815a56-34bd-4aea-9072-312cfdd0d80a@I-love.SAKURA.ne.jp
State New
Headers show
Series Bluetooth: L2CAP: Fix missing unlock in l2cap_conless_channel | expand

Commit Message

Tetsuo Handa July 27, 2024, 7:49 a.m. UTC
syzbot is reporting that l2cap_chan_unlock(chan) is missing.

Reported-by: syzbot <syzbot+45ac74737e866894acb0@syzkaller.appspotmail.com>
Closes: https://syzkaller.appspot.com/bug?extid=45ac74737e866894acb0
Fixes: f1a8f402f13f ("Bluetooth: L2CAP: Fix deadlock")
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
---
 net/bluetooth/l2cap_core.c | 1 +
 1 file changed, 1 insertion(+)

Comments

patchwork-bot+bluetooth@kernel.org Aug. 1, 2024, 8:20 a.m. UTC | #1
Hello:

This patch was applied to bluetooth/bluetooth-next.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:

On Sat, 27 Jul 2024 16:49:37 +0900 you wrote:
> syzbot is reporting that l2cap_chan_unlock(chan) is missing.
> 
> Reported-by: syzbot <syzbot+45ac74737e866894acb0@syzkaller.appspotmail.com>
> Closes: https://syzkaller.appspot.com/bug?extid=45ac74737e866894acb0
> Fixes: f1a8f402f13f ("Bluetooth: L2CAP: Fix deadlock")
> Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
> 
> [...]

Here is the summary with links:
  - Bluetooth: L2CAP: Fix missing unlock in l2cap_conless_channel
    https://git.kernel.org/bluetooth/bluetooth-next/c/1e69bd3ba19c

You are awesome, thank you!
diff mbox series

Patch

diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index c3c26bbb5ddae..9988ba382b686 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -6774,6 +6774,7 @@  static void l2cap_conless_channel(struct l2cap_conn *conn, __le16 psm,
 	bt_cb(skb)->l2cap.psm = psm;
 
 	if (!chan->ops->recv(chan, skb)) {
+		l2cap_chan_unlock(chan);
 		l2cap_chan_put(chan);
 		return;
 	}