From patchwork Mon May 30 06:42:45 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Uvarov X-Patchwork-Id: 68829 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp1248709qge; Sun, 29 May 2016 23:42:58 -0700 (PDT) X-Received: by 10.55.94.7 with SMTP id s7mr24417033qkb.181.1464590578506; Sun, 29 May 2016 23:42:58 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id o68si26965262qkd.161.2016.05.29.23.42.58; Sun, 29 May 2016 23:42:58 -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 2A5B1617AA; Mon, 30 May 2016 06:42:58 +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 002636169E; Mon, 30 May 2016 06:42:54 +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 CED906171F; Mon, 30 May 2016 06:42:52 +0000 (UTC) Received: from mail-lf0-f46.google.com (mail-lf0-f46.google.com [209.85.215.46]) by lists.linaro.org (Postfix) with ESMTPS id 8011D61586 for ; Mon, 30 May 2016 06:42:51 +0000 (UTC) Received: by mail-lf0-f46.google.com with SMTP id s64so44200199lfe.0 for ; Sun, 29 May 2016 23:42:51 -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=HLOBxb/cgRFAkl2LrEYCMVawLII7dbB/qYCx+OUwgSo=; b=AQfW61XmscrT6DXuLh6PVzfE4C3acBct2j4OSmxBtnwb2qSSFsEiuWxSfcbyisG6bb RZkG4kmXSoWRvm4kUeODS4KiJxTnXmMCKrBzX4ylPP6rX5mXXvzc1PDaD9+fi+TJNMWI Y8CDogq5kSLAF//ellol181U+9RKH2GjUtI/QkLSAhT9hlKeFN9tUPprhpf6vbcICAXL phkoyRE9AYwjtmY5E9n7Ec+XwPuLrBggrEKpfWD+X9kIzEvoCG3IBtQ8zQttLJrSIWD5 kaqDcjVpzLP56Wb5ZcRLnGAJrca8b/l4Fc8O5Xx21ZLZs8H4m4rgR8Urnfcfh7bmPGmt ypuw== X-Gm-Message-State: ALyK8tIRWJZjl/edtim/l7k4CaICPZZ/AcbHU6tHrEPuyUGp7iaKrHuaJcsZW9SXGUR8Gwa1EQM= X-Received: by 10.25.157.13 with SMTP id g13mr8250715lfe.10.1464590569761; Sun, 29 May 2016 23:42:49 -0700 (PDT) Received: from maxim-Aspire-VN7-791.d-systems.local ([185.75.190.112]) by smtp.gmail.com with ESMTPSA id 28sm2098595ljb.13.2016.05.29.23.42.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 29 May 2016 23:42:49 -0700 (PDT) From: Maxim Uvarov To: lng-odp@lists.linaro.org Date: Mon, 30 May 2016 09:42:45 +0300 Message-Id: <1464590565-16857-1-git-send-email-maxim.uvarov@linaro.org> X-Mailer: git-send-email 2.7.1.250.gff4ea60 X-Topics: patch Subject: [lng-odp] [PATCH] linux-generic: tm: init pthread attr to 0 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 --- 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..083f01b 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; + memset(&attr, 0, sizeof(pthread_attr_t)); cpu_num = tm_thread_cpu_select(); CPU_ZERO(&cpu_set); CPU_SET(cpu_num, &cpu_set);