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

Commit 50462ce0 authored by Fabian Frederick's avatar Fabian Frederick Committed by David S. Miller
Browse files

hso: 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 avatarDavid S. Miller <davem@davemloft.net>
parent 45cee4f5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1594,7 +1594,7 @@ hso_wait_modem_status(struct hso_serial *serial, unsigned long arg)
		}
		cprev = cnow;
	}
	current->state = TASK_RUNNING;
	__set_current_state(TASK_RUNNING);
	remove_wait_queue(&tiocmget->waitq, &wait);

	return ret;