diff options
author | John Ogness <[email protected]> | 2022-11-16 17:27:27 +0106 |
---|---|---|
committer | Petr Mladek <[email protected]> | 2022-12-02 11:25:00 +0100 |
commit | fc956ae0de7fa25f99114609f21b76e7d38dc25c (patch) | |
tree | 9b87bb79f45244d81f8b709086bba87f04132fd3 /tools/perf/scripts/python/task-analyzer.py | |
parent | b8ef04be6e1935748ef98af98d81b0744cf225d0 (diff) |
printk: console_flush_all: use srcu console list iterator
Guarantee safe iteration of the console list by using SRCU.
Note that in the case of a handover, the SRCU read lock is also
released. This is documented in the function description and as
comments in the code. It is a bit tricky, but this preserves the
lockdep lock ordering for the context handing over the
console_lock:
console_lock()
| mutex_acquire(&console_lock_dep_map) <-- console lock
|
console_unlock()
| console_flush_all()
| | srcu_read_lock(&console_srcu) <-- srcu lock
| | console_emit_next_record()
| | | console_lock_spinning_disable_and_check()
| | | | srcu_read_unlock(&console_srcu) <-- srcu unlock
| | | | mutex_release(&console_lock_dep_map) <-- console unlock
Signed-off-by: John Ogness <[email protected]>
Reviewed-by: Petr Mladek <[email protected]>
Signed-off-by: Petr Mladek <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'tools/perf/scripts/python/task-analyzer.py')
0 files changed, 0 insertions, 0 deletions