Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 5da8e47d authored by Jeffy Chen's avatar Jeffy Chen Committed by Marcel Holtmann
Browse files

Bluetooth: hidp: fix possible might sleep error in hidp_session_thread

It looks like hidp_session_thread has same pattern as the issue reported in
old rfcomm:

	while (1) {
		set_current_state(TASK_INTERRUPTIBLE);
		if (condition)
			break;
		// may call might_sleep here
		schedule();
	}
	__set_current_state(TASK_RUNNING);

Which fixed at:
	dfb2fae7 Bluetooth: Fix nested sleeps

So let's fix it at the same way, also follow the suggestion of:
https://lwn.net/Articles/628628/



Signed-off-by: default avatarJeffy Chen <jeffy.chen@rock-chips.com>
Tested-by: default avatarAL Yu-Chen Cho <acho@suse.com>
Tested-by: default avatarRohit Vaswani <rvaswani@nvidia.com>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent f06d9773
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment