Re: [PATCH] Bluetooth: sco: Fix a race condition in sco_sock_timeout()

From: patchwork-bot+bluetooth

Date: Fri Jun 26 2026 - 07:17:21 EST


Hello:

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

On Wed, 24 Jun 2026 17:33:04 -0400 you wrote:
> sco_sock_timeout() runs asynchronously and lock_sock(sk). If the socket
> is closing while the timer is running, it holds the same lock
> (lock_sock(sk)) twice, leading to a deadlock.
>
> CPU 0 CPU 1
> ==================== ======================
> sco_sock_close()
> sco_sock_timeout()
> lock_sock(sk) // <-- LOCK
> __sco_sock_close()
> sco_chan_del()
> sco_conn_put()
> sco_conn_free()
> disable_delayed_work_sync()
> lock(sk) // <-- SAME LOCK
>
> [...]

Here is the summary with links:
- Bluetooth: sco: Fix a race condition in sco_sock_timeout()
https://git.kernel.org/bluetooth/bluetooth-next/c/cddcc54a7afe

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html