diff options
| author | Masami Hiramatsu (Google) <mhiramat@kernel.org> | 2026-11-02 16:11:25 +0900 |
|---|---|---|
| committer | Masami Hiramatsu (Google) <mhiramat@kernel.org> | 2026-11-06 12:22:40 +0900 |
| commit | 76a224e04a723af1e2afc185fa0a4b82101f62dd (patch) | |
| tree | edb6f880fa8eb9fe0733a9da22b6cafa84cc0eca /include/linux/timerqueue.h | |
| parent | df87101f816083ad5da559f8be8eac1cee94e38f (diff) | |
docs: trace: Warn against using printk() in probe handlers
Probe handlers (kprobes, kretprobes, and fprobes) execute in atomic or
non-preemptible contexts. Because handlers do not run in NMI context
(especially when jump-optimized or ftrace-based), calling printk()
directly can attempt to synchronously acquire console driver locks or
scheduler locks (via console_unlock()), risking a deadlock if the probed
or interrupted context already holds those locks.
Document this restriction in both kprobes.rst and fprobe.rst, and
recommend using trace_printk() instead to safely log messages to the
ftrace buffer.
Link: https://lore.kernel.org/all/179360348516.115681.16358304979974648339.stgit@devnote2/
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Diffstat (limited to 'include/linux/timerqueue.h')
0 files changed, 0 insertions, 0 deletions
