From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH] eal: fix out of bound access when no cpu is available Date: Thu, 17 Jan 2019 17:34:01 +0100 Message-ID: <3463567.oezzxnnWpT@xps> References: <1547730777-20405-1-git-send-email-david.marchand@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, bruce.richardson@intel.com, solal.pirelli@gmail.com To: David Marchand Return-path: Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) by dpdk.org (Postfix) with ESMTP id 5577F10A3 for ; Thu, 17 Jan 2019 17:34:06 +0100 (CET) In-Reply-To: <1547730777-20405-1-git-send-email-david.marchand@redhat.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 We should backport this fix. When this bug has been introduced?