From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 370D15424; Tue, 19 Feb 2019 21:41:27 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9062437E88; Tue, 19 Feb 2019 20:41:26 +0000 (UTC) Received: from dmarchan.remote.csb (ovpn-204-16.brq.redhat.com [10.40.204.16]) by smtp.corp.redhat.com (Postfix) with ESMTP id 050C6600C0; Tue, 19 Feb 2019 20:41:24 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: olivier.matz@6wind.com, anatoly.burakov@intel.com, ktraynor@redhat.com, stable@dpdk.org Date: Tue, 19 Feb 2019 21:41:10 +0100 Message-Id: <1550608871-5251-1-git-send-email-david.marchand@redhat.com> In-Reply-To: <1550151042-9764-1-git-send-email-david.marchand@redhat.com> References: <1550151042-9764-1-git-send-email-david.marchand@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Tue, 19 Feb 2019 20:41:26 +0000 (UTC) Subject: [dpdk-stable] [PATCH v3 1/2] eal: fix potential incorrect pinning for ctrl threads X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Feb 2019 20:41:27 -0000 pthread_setaffinity_np returns a >0 value on error. We could end up letting the ctrl threads on the current process cpu affinity. Fixes: d651ee4919cd ("eal: set affinity for control threads") Cc: stable@dpdk.org Signed-off-by: David Marchand --- Changelog since v2: - added missing Cc: stable@dpdk.org --- lib/librte_eal/common/eal_common_thread.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_eal/common/eal_common_thread.c b/lib/librte_eal/common/eal_common_thread.c index 48ef4d6..a3985ce 100644 --- a/lib/librte_eal/common/eal_common_thread.c +++ b/lib/librte_eal/common/eal_common_thread.c @@ -209,7 +209,7 @@ static void *rte_thread_init(void *arg) CPU_SET(rte_get_master_lcore(), &cpuset); ret = pthread_setaffinity_np(*thread, sizeof(cpuset), &cpuset); - if (ret < 0) + if (ret) goto fail; ret = pthread_barrier_wait(¶ms->configured); -- 1.8.3.1