On 2024/10/27 11:00, Stephen Hemminger wrote: > On Sat, 26 Oct 2024 18:14:40 +0800 > Jie Hai <[email protected]> wrote: > >> Multiple threads calling the same function may cause condition >> race issues, which often leads to abnormal behavior and can cause >> more serious vulnerabilities such as abnormal termination, denial >> of service, and compromised data integrity. >> >> The strtok() is non-reentrant, it is better to replace it with a >> reentrant version. >> >> Fixes: 2054f31a1fcd ("mem: add memseg info in telemetry") >> Cc: [email protected] >> >> Signed-off-by: Jie Hai <[email protected]> >> Acked-by: Chengwen Feng <[email protected]> >> Acked-by: Amit Prakash Shukla <[email protected]> >> Acked-by: Morten Brørup <[email protected]> > > This doesn't need to go to stable. parse_params is always single threaded.
I recommend replacing all, based on: 1\ almost at no cost. 2\ reduce analysis costs, if don't we have to analyze the callers of strtok when you encounter it.

