From patchwork Tue May 31 07:05:57 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Uvarov X-Patchwork-Id: 68892 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp1776093qge; Tue, 31 May 2016 00:06:11 -0700 (PDT) X-Received: by 10.55.5.144 with SMTP id 138mr11629136qkf.196.1464678371573; Tue, 31 May 2016 00:06:11 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id 64si21049954qgy.27.2016.05.31.00.06.11; Tue, 31 May 2016 00:06:11 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 2520461658; Tue, 31 May 2016 07:06:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id C72DB61642; Tue, 31 May 2016 07:06:07 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id D89B061650; Tue, 31 May 2016 07:06:05 +0000 (UTC) Received: from mail-lf0-f41.google.com (mail-lf0-f41.google.com [209.85.215.41]) by lists.linaro.org (Postfix) with ESMTPS id DC77961642 for ; Tue, 31 May 2016 07:06:04 +0000 (UTC) Received: by mail-lf0-f41.google.com with SMTP id b73so61234240lfb.3 for ; Tue, 31 May 2016 00:06:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=UayhnEWxpdD7E06q/zakprszOHv5Nn7JNOJ+3DM7Q2o=; b=Lqm3tZ1steTO6GhspPt/8+p8aEaWoTjF7fBCBx3W2pLbNEEpMMDx18+gerUWQRsYJZ 0NM+Lan2IKQwfcK+klb3X2+3fd0wOAfx3kf6tehSYnhB03aNDdXYyPZjvkOOfSsXK1ds 7e9P5QawoSTemRUXjsKN/gZNVwbvPDtRlUXHz16QbwZdyt+Nci14THO/89UTDHOJvXH/ TZ1PY+8AfYuN7mLhXiDBAIapfHHDeR1fYF/G4GsRIBZQBDpboQsKo41amlZ5WYFw21TE DNbg4ObVBBu1AttnahnI5rmE858le3cD8n3Ytg/cf5pqSpRd/j0XSB8U52iTH1O4A+/h Es0g== X-Gm-Message-State: ALyK8tJ7WatlEv0kgjGMX7AgjzhFdBv/BqmBvAGT55ogQzDIRh0E0vHKoDNsygUZDPIOL1/bIDM= X-Received: by 10.25.169.134 with SMTP id s128mr3175187lfe.84.1464678363813; Tue, 31 May 2016 00:06:03 -0700 (PDT) Received: from maxim-Aspire-VN7-791.d-systems.local ([185.75.190.112]) by smtp.gmail.com with ESMTPSA id d202sm1636078lfe.36.2016.05.31.00.06.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 31 May 2016 00:06:03 -0700 (PDT) From: Maxim Uvarov To: lng-odp@lists.linaro.org Date: Tue, 31 May 2016 10:05:57 +0300 Message-Id: <1464678357-9455-1-git-send-email-maxim.uvarov@linaro.org> X-Mailer: git-send-email 2.7.1.250.gff4ea60 X-Topics: patch Subject: [lng-odp] [PATCHv2] linux-generic: tm: init pthread attrs X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" Fix segmentation failt with not initialized attr for pthreads. Signed-off-by: Maxim Uvarov Reviewed-by: Bill Fischofer --- platform/linux-generic/odp_traffic_mngr.c | 1 + 1 file changed, 1 insertion(+) diff --git a/platform/linux-generic/odp_traffic_mngr.c b/platform/linux-generic/odp_traffic_mngr.c index 0b37142..fb18ab3 100644 --- a/platform/linux-generic/odp_traffic_mngr.c +++ b/platform/linux-generic/odp_traffic_mngr.c @@ -2551,6 +2551,7 @@ static int tm_thread_create(tm_system_t *tm_system) uint32_t cpu_num; int rc; + pthread_attr_init(&attr); cpu_num = tm_thread_cpu_select(); CPU_ZERO(&cpu_set); CPU_SET(cpu_num, &cpu_set);