summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorPeter Hurley <peter@hurleysoftware.com>2014-10-16 16:54:27 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-11-05 18:53:55 -0800
commit91b32f5413c17e80ac6616dd9c62e826fa438e2d (patch)
tree89137cf0355ed9a12874bd414e4023980e69420f /tools/perf/scripts/python
parent64dbee31050d5b93b5fcda25508e4d3c69f6589c (diff)
serial: core: Fix port count when uart_open() errors
A port count mismatch occurs if mutex_lock_interruptible() exits uart_open() and the port has already been opened. This may prematurely close a port on an open tty. Since uart_close() is _always_ called if uart_open() fails, the port count must be corrected if errors occur. Always increment the port count in uart_open(), regardless of errors; always decrement the port count in uart_close(). Note that tty_port_close_start() decrements the port count when uart_open() was successful. Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions