diff options
| author | Shengming Hu <hu.shengming@zte.com.cn> | 2026-02-21 11:33:14 +0800 |
|---|---|---|
| committer | Steven Rostedt (Google) <rostedt@goodmis.org> | 2026-03-03 22:11:20 -0500 |
| commit | b96d0c59cdbb2a22b2545f6f3d5c6276b05761dd (patch) | |
| tree | 0da70a04b14243c5731aa90cf5f04e559b579936 /include/linux/mod_devicetable.h | |
| parent | 6ca8379b5d36e22b04e6315c3e49a6083377c862 (diff) | |
fgraph: Fix thresh_return nosleeptime double-adjust
trace_graph_thresh_return() called handle_nosleeptime() and then delegated
to trace_graph_return(), which calls handle_nosleeptime() again. When
sleep-time accounting is disabled this double-adjusts calltime and can
produce bogus durations (including underflow).
Fix this by computing rettime once, applying handle_nosleeptime() only
once, using the adjusted calltime for threshold comparison, and writing
the return event directly via __trace_graph_return() when the threshold is
met.
Cc: stable@vger.kernel.org
Link: https://patch.msgid.link/20260221113314048jE4VRwIyZEALiYByGK0My@zte.com.cn
Fixes: 3c9880f3ab52b ("ftrace: Use a running sleeptime instead of saving on shadow stack")
Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: Shengming Hu <hu.shengming@zte.com.cn>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Diffstat (limited to 'include/linux/mod_devicetable.h')
0 files changed, 0 insertions, 0 deletions
