diff options
| author | Peter Hurley <[email protected]> | 2016-04-09 18:56:33 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2016-04-30 09:26:55 -0700 |
| commit | 4047b37122d1be8dd8e8c504f6f596930b660188 (patch) | |
| tree | 678ddab05db8005e3f637d5b91149e5f99e2f2dc /tools/perf/scripts/python | |
| parent | 49c02304fe97f88ee65f92368fe3f473201a7976 (diff) | |
serial: core: Prevent unsafe uart port access, part 1
uart_remove_one_port() may race with every serial core operation
requiring a valid dereference of state->uart_port. In particular,
uart_remove_one_port() may unlink the uart port concurrently with
any serial core operation that may dereference same.
Ensure safe dereference for those operations that already claim
the port->mutex, and extend that guarantee for trivial cases,
such as the ioctl handlers. Introduce the uart_port_check() helper
which asserts port->mutex is held (only when lockdep is on).
For ioctls, return -EIO as if the port has been hung up (since it has).
Signed-off-by: Peter Hurley <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions