[PATCH 10/21] lib/eal: replace strtok with strtok_r
Stephen Hemminger
stephen at networkplumber.org
Tue Nov 14 02:08:17 CET 2023
On Tue, 14 Nov 2023 09:05:10 +0800
fengchengwen <fengchengwen at huawei.com> wrote:
> Hi Stephen,
>
> On 2023/11/14 0:27, Stephen Hemminger wrote:
> > On Mon, 13 Nov 2023 18:45:39 +0800
> > Jie Hai <haijie1 at huawei.com> 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.
> >
> > This code is only called in startup and can not be called by
> > multiple threads.
>
> For the DPDK examples and apps, I think it's OK if it called in startup then may not need replace.
>
> But as for lib and drivers, I think we shouldn't make such an assumption.
>
> At last I also recommend fix the examples and apps, because people may refer it.
For startup of libs and driver initialization the code is always single threaded.
If not many, many other things would break.
More information about the dev
mailing list