From: Mathieu Desnoyers Date: Wed, 3 Feb 2021 15:21:42 +0000 (-0500) Subject: Fix: use MT-safe strtok_r in multithreaded context X-Git-Tag: v2.11.6~1 X-Git-Url: https://git.liburcu.org/?a=commitdiff_plain;h=81d58936ceb13b491c1bceffae0219f275b38fc2;hp=81d58936ceb13b491c1bceffae0219f275b38fc2;p=lttng-tools.git Fix: use MT-safe strtok_r in multithreaded context append_list_to_probes uses the non-multithread-safe "strtok" while in multithreaded context. It is called by modprobe_lttng_data(), which is called from init_kernel_tracer(). init_kernel_tracer is used from main() after other threads are created, and also from process_client_msg() when a user attempts to interact with the kernel domain if the kernel tracer has not yet been successfully initialized. Fixed by using the MT-safe strtok_r() instead. Signed-off-by: Mathieu Desnoyers Signed-off-by: Jérémie Galarneau Change-Id: Ic3f81551b8508451e0f9733c5de56a4d4407b813 ---