[PATCH linux-evl] evl/trace: Fix crash of evl_sleep_on tracepoint
Jan Kiszka <[email protected]>
| Newsgroups | dev.linux.lists.xenomai |
|---|---|
| Message-ID | <[email protected]> |
From: Jan Kiszka <[email protected]> wchan can be NULL, and that will crash with tracing enabled. In contrast, clock cannot be NULL, thus does not need this guard. Fixes: 35d7f895d5d6 ("evl/trace: prefer object name over address", v6.18.y-evl-rebase) Signed-off-by: Jan Kiszka <[email protected]> --- include/trace/events/evl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/trace/events/evl.h b/include/trace/events/evl.h index 035a279fd86b8..88265c1eae136 100644 --- a/include/trace/events/evl.h +++ b/include/trace/events/evl.h @@ -347,7 +347,7 @@ TRACE_EVENT(evl_sleep_on, __field(pid_t, pid) __field(ktime_t, timeout) __field(enum evl_tmode, timeout_mode) - __string(wchan_name, wchan->name) + __string(wchan_name, wchan ? wchan->name : "none") __string(clock_name, clock->name) ), -- 2.47.3