[dpdk-dev] [PATCH] eal: fix out of bound access when no cpu is available

David Marchand david.marchand at redhat.com
Thu Jan 17 18:17:59 CET 2019


On Thu, Jan 17, 2019 at 5:34 PM Thomas Monjalon <thomas at monjalon.net> wrote:

> 17/01/2019 14:12, David Marchand:
> > In the unlikely case when the dpdk application is started with no cpu
> > available in the [0, RTE_MAX_LCORE - 1] range, the master_lcore is
> > automatically chosen as RTE_MAX_LCORE which triggers an out of bound
> > access.
> >
> > Either you have a crash then, or the initialisation fails later when
> > trying to pin the master thread on it.
> > In my test, with RTE_MAX_LCORE == 2:
> >
> > $ taskset -c 2 ./master/app/testpmd --no-huge -m 512 --log-level *:debug
> > [...]
> > EAL: pthread_setaffinity_np failed
> > PANIC in eal_thread_init_master():
> > cannot set affinity
> > 7: [./master/app/testpmd() [0x47f629]]
> >
> > Bugzilla ID: 19
> > Signed-off-by: David Marchand <david.marchand at redhat.com>
>
> We should backport this fix.
> When this bug has been introduced?
>

Indeed, at first, I thought the problem had always been there, but it
should be starting 17.02:
Fixes: 2eba8d21f3c9 ("eal: restrict cores auto detection")

+ CC stable

Do you want a v2 ?


-- 
David Marchand


More information about the dev mailing list