Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Bluetooth: btmtk: Fix wait_on_bit_timeout interruption during shutdown

During the shutdown process, an interrupt occurs that
prematurely terminates the wait for the expected event.
This change replaces TASK_INTERRUPTIBLE with
TASK_UNINTERRUPTIBLE in the wait_on_bit_timeout call to ensure
the shutdown process completes as intended without being
interrupted by signals.

Fixes: d019930b0049 ("Bluetooth: btmtk: move btusb_mtk_hci_wmt_sync to btmtk.c")
Signed-off-by: Jiande Lu <jiande.lu@mediatek.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

authored by

Jiande Lu and committed by
Luiz Augusto von Dentz
099799fa 3ba486c5

+1 -6
+1 -6
drivers/bluetooth/btmtk.c
··· 642 642 * WMT command. 643 643 */ 644 644 err = wait_on_bit_timeout(&data->flags, BTMTK_TX_WAIT_VND_EVT, 645 - TASK_INTERRUPTIBLE, HCI_INIT_TIMEOUT); 646 - if (err == -EINTR) { 647 - bt_dev_err(hdev, "Execution of wmt command interrupted"); 648 - clear_bit(BTMTK_TX_WAIT_VND_EVT, &data->flags); 649 - goto err_free_wc; 650 - } 645 + TASK_UNINTERRUPTIBLE, HCI_INIT_TIMEOUT); 651 646 652 647 if (err) { 653 648 bt_dev_err(hdev, "Execution of wmt command timed out");