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

Commit 81baf8c5 authored by Jeffy Chen's avatar Jeffy Chen Committed by Greg Kroah-Hartman
Browse files

Bluetooth: hidp: fix possible might sleep error in hidp_session_thread

commit 5da8e47d849d3d37b14129f038782a095b9ad049 upstream.

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:
	dfb2fae 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>
Cc: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d5255d9d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment