Re: [PATCH] Bluetooth: hci_serdev: serialize flush with transmit work

From: patchwork-bot+bluetooth

Date: Tue Nov 17 2026 - 13:51:58 EST


Hello:

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

On Mon, 16 Nov 2026 16:05:38 +0800 you wrote:
> hci_uart_flush() runs on HCI close and reset and frees hu->tx_skb while
> write_work may still be sending the same partial frame. The worker can
> then resume with a freed skb, or both paths can free the frame.
>
> The tty flush has stopped write_work before freeing the partial frame
> since commit 1b0d946d6f08 ("Bluetooth: hci_uart: clear HCI_UART_SENDING
> when write_work is canceled"). Do the same in the serdev flush: disable
> and drain write_work before releasing the frame, and hold
> HCI_UART_SENDING meanwhile so that hci_uart_tx_wakeup() only records
> HCI_UART_TX_WAKEUP. Then re-enable the work, release SENDING and replay
> a wakeup that arrived in between.
>
> [...]

Here is the summary with links:
- Bluetooth: hci_serdev: serialize flush with transmit work
https://git.kernel.org/bluetooth/bluetooth-next/c/ee43bade37c4

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