[PATCH 1/8] telemetry: fix thread-unsafe command parsing
fengchengwen
fengchengwen at huawei.com
Mon Jun 8 03:25:56 CEST 2026
Acked-by: Chengwen Feng <fengchengwen at huawei.com>
On 6/6/2026 4:50 AM, Stephen Hemminger wrote:
> The telemetry client_handler() runs in a detached thread per connection,
> and up to MAX_CONNECTIONS instances can run concurrently.
> The function strtok() keeps parser state in a static variable
> shared across all threads, so concurrent clients corrupt each other's
> command parsing. Use strtok_r() with a local saveptr.
>
> Fixes: 6dd571fd07c3 ("telemetry: introduce new functionality")
> Cc: stable at dpdk.org
>
> Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
More information about the dev
mailing list