diff options
author | Takatoshi Akiyama <takatoshi.akiyama.kj@ps.hitachi-solutions.com> | 2017-11-02 11:14:55 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-11-04 12:08:53 +0100 |
commit | 1be2266392196de82d1cfcc8a68e770cf8f48c60 (patch) | |
tree | def07061b1b69d59ebe6c004e5a8e6ffadd35648 /drivers/tty/serial/m32r_sio.c | |
parent | 0ea46e6e58ab7447222bcaa10be0adcd9f92284d (diff) |
serial: sh-sci: Fix unlocked access to SCSCR register
The SCSCR register access in sci_break_ctl() is not locked.
sci_start_tx() and sci_set_termios() changes the SCSCR register,
but does not lock sci_port.
Therefore, this patch adds lock during register access.
Also, remove the log output that leads to a double lock.
Some analysis of where locks are not taken is as follows.
It appears that the lock is not taken in:
- sci_start_tx(), sci_stop_tx() as this is installed as a callback.
And all callers of the callback take the lock.
- start_rx as callers take the lock.
- stop_rx. this is both installed as a callback and called directly.
In both cases the caller takes the lock.
Signed-off-by: Takatoshi Akiyama <takatoshi.akiyama.kj@ps.hitachi-solutions.com>
Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/m32r_sio.c')
0 files changed, 0 insertions, 0 deletions