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

Commit 97f9f707 authored by Fabian Frederick's avatar Fabian Frederick Committed by Greg Kroah-Hartman
Browse files

serial: core: replace current->state by __set_current_state()



Use helper functions to access current->state.
Direct assignments are prone to races and therefore buggy.

Thanks to Peter Zijlstra for the exact definition of the problem.

Suggested-By: default avatarPeter Zijlstra <peterz@infradead.org>
Signed-off-by: default avatarFabian Frederick <fabf@skynet.be>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5dcb34bb
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -1118,8 +1118,7 @@ uart_wait_modem_status(struct uart_state *state, unsigned long arg)

		cprev = cnow;
	}

	current->state = TASK_RUNNING;
	__set_current_state(TASK_RUNNING);
	remove_wait_queue(&port->delta_msr_wait, &wait);

	return ret;