[PATCH 02/43] eal: use rte strerror

Stephen Hemminger stephen at networkplumber.org
Thu Feb 1 22:49:41 CET 2024


On Wed, 15 Nov 2023 12:16:18 +0100
Morten Brørup <mb at smartsharesystems.com> wrote:

> > From: Stephen Hemminger [mailto:stephen at networkplumber.org]
> > Sent: Wednesday, 15 November 2023 01.18
> > 
> > On Tue, 14 Nov 2023 16:24:58 +0800
> > Dengdui Huang <huangdengdui at huawei.com> wrote:
> >   
> > > The function strerror() is insecure in a multi-thread environment.
> > > This patch uses rte_strerror() to replace it.
> > >
> > > Cc: stable at dpdk.org
> > >
> > > Signed-off-by: Dengdui Huang <huangdengdui at huawei.com>
> > > Acked-by: Chengwen Feng <fengchengwen at huawei.com>  
> > 
> > NAK.
> > rte_strerror() is no more thrad safe than strerror()  
> 
> It is thread safe:
> https://elixir.bootlin.com/dpdk/v23.11-rc3/source/lib/eal/common/eal_common_errno.c#L31

Thread safe, but not signal safe.
 a per-core buffer is not safe against preemption in an interrupt.


More information about the dev mailing list