Files
linux/samples
Masami Hiramatsu (Google) df87101f81 samples/fprobe: Use trace_printk() and trace_dump_stack()
Fprobe entry and exit callbacks execute in atomic context with
preemption disabled under ftrace recursion protection. Calling
printk() directly inside handlers can lead to deadlocks if console
or scheduler locks are already held by the probed or interrupted context.

Drop the use_trace module parameter and always use trace_printk()
for handler logging. In addition, replace stack_trace_print() (which
uses printk()) with trace_dump_stack(0) to output backtraces safely
to the ftrace buffer. Also update the module header comment to
reference /sys/kernel/tracing/trace.

Additionally, update CONFIG_SAMPLE_FPROBE in samples/Kconfig to
depend on EVENT_TRACING so that the tracing subsystem is enabled
when building the sample.

Link: https://lore.kernel.org/all/179360347512.115681.7201999490892291449.stgit@devnote2/

Signed-off-by: Masami Hiramatsu (Google) <[email protected]>
2026-11-06 12:22:31 +09:00
..
2024-05-04 18:59:44 +02:00
…
…
2026-10-14 22:08:01 +02:00
…