summaryrefslogtreecommitdiff
path: root/include/linux/debugobjects.h
diff options
context:
space:
mode:
authorMasami Hiramatsu (Google) <mhiramat@kernel.org>2026-11-02 16:11:25 +0900
committerMasami Hiramatsu (Google) <mhiramat@kernel.org>2026-11-06 12:22:40 +0900
commit76a224e04a723af1e2afc185fa0a4b82101f62dd (patch)
treeedb6f880fa8eb9fe0733a9da22b6cafa84cc0eca /include/linux/debugobjects.h
parentdf87101f816083ad5da559f8be8eac1cee94e38f (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/debugobjects.h')
0 files changed, 0 insertions, 0 deletions