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

Commit 8cf19b27 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "kthread: Ensure task isn't preempted before dequeue in kthread_parkme"

parents ca63288c 97955bf5
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -160,9 +160,11 @@ static void __kthread_parkme(struct kthread *self)
{
	__set_current_state(TASK_PARKED);
	while (test_bit(KTHREAD_SHOULD_PARK, &self->flags)) {
		preempt_disable();
		if (!test_and_set_bit(KTHREAD_IS_PARKED, &self->flags))
			complete(&self->parked);
		schedule();
		schedule_preempt_disabled();
		preempt_enable();
		__set_current_state(TASK_PARKED);
	}
	clear_bit(KTHREAD_IS_PARKED, &self->flags);