diff options
author | 2015-02-20 19:12:55 +0100 | |
---|---|---|
committer | 2015-02-22 15:24:10 -0500 | |
commit | 50462ce0052c67b5a06f19fb7c7f308813006879 (patch) | |
tree | fa0ee3b4d3d46d5c4b21f8b215b8a6af0005ff8d /drivers/net/usb/hso.c | |
parent | mISDN: replace current->state by set_current_state() (diff) | |
download | linux-50462ce0052c67b5a06f19fb7c7f308813006879.tar.gz linux-50462ce0052c67b5a06f19fb7c7f308813006879.tar.bz2 linux-50462ce0052c67b5a06f19fb7c7f308813006879.zip |
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: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/usb/hso.c')
-rw-r--r-- | drivers/net/usb/hso.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c index 9cdfb3fe9c15..778e91531fac 100644 --- a/drivers/net/usb/hso.c +++ b/drivers/net/usb/hso.c @@ -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; |