]> git.ipfire.org Git - thirdparty/linux.git/commit
rtla: Handle pthread_create() failure properly
authorWander Lairson Costa <wander@redhat.com>
Mon, 9 Mar 2026 19:46:22 +0000 (16:46 -0300)
committerTomas Glozar <tglozar@redhat.com>
Wed, 11 Mar 2026 14:29:50 +0000 (15:29 +0100)
commitd847188bb92b14518a04d7542e44928a22060847
tree52a60fd57d7c6cc3455992d97e9f6ff3fa03033c
parentd6515424e80583928ec1c55e9dd4e906bc90d9be
rtla: Handle pthread_create() failure properly

Add proper error handling when pthread_create() fails to create the
timerlat user-space dispatcher thread. Previously, the code only logged
an error message but continued execution, which could lead to undefined
behavior when the tool later expects the thread to be running.

When pthread_create() returns an error, the function now jumps to the
out_trace error path to properly clean up resources and exit. This
ensures consistent error handling and prevents the tool from running
in an invalid state without the required user-space thread.

Signed-off-by: Wander Lairson Costa <wander@redhat.com>
Link: https://lore.kernel.org/r/20260309195040.1019085-10-wander@redhat.com
Signed-off-by: Tomas Glozar <tglozar@redhat.com>
tools/tracing/rtla/src/common.c