[PATCH v6] eal/linux: fix fbarray name collision in containers

Stephen Hemminger stephen at networkplumber.org
Mon Feb 16 23:26:21 CET 2026


On Mon, 16 Feb 2026 18:22:48 +0100
David Marchand <david.marchand at redhat.com> wrote:

> On Fri, 13 Feb 2026 at 23:01, Stephen Hemminger
> <stephen at networkplumber.org> wrote:
> >
> > From: Congjie Zhou <zcjie0802 at qq.com>
> >
> > When multiple secondary processes run in different containers that
> > share the same hugetlbfs mount, the fbarray names can collide.
> > This happens because containers use separate PID namespaces, so
> > different processes in different containers can have the same PID.
> >
> > Fix by replacing the PID with a timestamp-based value. The TSC
> > (timestamp counter) provides sufficient uniqueness since containers
> > starting at the same CPU cycle is practically impossible - even 1ms
> > of startup time difference means millions of cycles apart at GHz
> > frequencies.
> >
> > Also, reduce the name buffer from PATH_MAX to RTE_FBARRAY_NAME_LEN
> > since it is only used for the fbarray name.
> >  
> 
> Afaics, the filename generation comes from:
> 524e43c2ad9a ("mem: prepare memseg lists for multiprocess sync")
> 
> > Fixes: 046aa5c4477b ("mem: add memalloc init stage")  
> 
> This change ^^ only moved the point in EAL init where the name was generated.

Thanks, I didn't go digging back through the history and was more looking
at what to blame.


More information about the stable mailing list