]> git.ipfire.org Git - thirdparty/linux.git/commit
tracing/events: Fix to check the simple_tsk_fn creation
authorMasami Hiramatsu (Google) <mhiramat@kernel.org>
Wed, 24 Jun 2026 23:34:46 +0000 (08:34 +0900)
committerMasami Hiramatsu (Google) <mhiramat@kernel.org>
Tue, 30 Jun 2026 14:58:19 +0000 (23:58 +0900)
commitcda1fbfc5313bb90daa271d45eea4a8d317a8544
tree93f527e1a7a6b3848b6c0dfcc0cf7eb5cc9992d7
parent251a8fe1b9aedccd298b77bc28426d564c5a923f
tracing/events: Fix to check the simple_tsk_fn creation

Sashiko pointed that this sample code does not correctly handle the
failure of thread creation because kthread_run() can return -errno.

Check the simple_tsk_fn is correctly initialized (created) or not.

Link: https://lore.kernel.org/all/178165817322.269421.3992299509400184196.stgit@devnote2/
Link: https://sashiko.dev/#/patchset/178092865666.163648.10457567771536160909.stgit%40devnote2
Fixes: 9cfe06f8cd5c ("tracing/events: add trace-events-sample")
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
samples/trace_events/trace-events-sample.c