]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/4.14.60/bluetooth-hci_qca-fix-sleep-inside-atomic-section-warning.patch
Fixes for 5.10
[thirdparty/kernel/stable-queue.git] / releases / 4.14.60 / bluetooth-hci_qca-fix-sleep-inside-atomic-section-warning.patch
CommitLineData
a65d4bac
GKH
1From foo@baz Sat Jul 28 10:25:26 CEST 2018
2From: Thierry Escande <thierry.escande@linaro.org>
3Date: Tue, 29 May 2018 18:37:16 +0200
4Subject: Bluetooth: hci_qca: Fix "Sleep inside atomic section" warning
5
6From: Thierry Escande <thierry.escande@linaro.org>
7
8[ Upstream commit 9960521c44a5d828f29636ceac0600603ecbddbf ]
9
10This patch fixes the following warning during boot:
11
12 do not call blocking ops when !TASK_RUNNING; state=1 set at
13 [<(ptrval)>] qca_setup+0x194/0x750 [hci_uart]
14 WARNING: CPU: 2 PID: 1878 at kernel/sched/core.c:6135
15 __might_sleep+0x7c/0x88
16
17In qca_set_baudrate(), the current task state is set to
18TASK_UNINTERRUPTIBLE before going to sleep for 300ms. It was then
19restored to TASK_INTERRUPTIBLE. This patch sets the current task state
20back to TASK_RUNNING instead.
21
22Signed-off-by: Thierry Escande <thierry.escande@linaro.org>
23Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
24Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
25Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
26---
27 drivers/bluetooth/hci_qca.c | 2 +-
28 1 file changed, 1 insertion(+), 1 deletion(-)
29
30--- a/drivers/bluetooth/hci_qca.c
31+++ b/drivers/bluetooth/hci_qca.c
32@@ -881,7 +881,7 @@ static int qca_set_baudrate(struct hci_d
33 */
34 set_current_state(TASK_UNINTERRUPTIBLE);
35 schedule_timeout(msecs_to_jiffies(BAUDRATE_SETTLE_TIMEOUT_MS));
36- set_current_state(TASK_INTERRUPTIBLE);
37+ set_current_state(TASK_RUNNING);
38
39 return 0;
40 }