From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id B31C5A0A0C; Thu, 8 Apr 2021 19:06:25 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3269314118F; Thu, 8 Apr 2021 19:06:25 +0200 (CEST) Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-eopbgr20087.outbound.protection.outlook.com [40.107.2.87]) by mails.dpdk.org (Postfix) with ESMTP id 3380414118E; Thu, 8 Apr 2021 19:06:23 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=r3Ch3s5sXm+xXg8ecKgAJFPgDvMGWyyvRJigcnACot8=; b=2670zBxGFoayOEcuy+cwqUr+QsvOCEK7yQbjRiRwl2D+ZSeoRoOsvSOqbRy44FKBEYkT5g+L2MP5jSTro3tEwRbgDWb3Ujbwq7tv3DPbUfdBMRVuSa82KymJ6NHctm7FWiCJnSdiIn1jbjtTvU1Scd9ZJxlTk6dIKDMzFb060aU= Received: from AM5PR0301CA0030.eurprd03.prod.outlook.com (2603:10a6:206:14::43) by VI1PR08MB3136.eurprd08.prod.outlook.com (2603:10a6:803:45::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4020.18; Thu, 8 Apr 2021 17:06:21 +0000 Received: from AM5EUR03FT041.eop-EUR03.prod.protection.outlook.com (2603:10a6:206:14:cafe::5) by AM5PR0301CA0030.outlook.office365.com (2603:10a6:206:14::43) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4020.17 via Frontend Transport; Thu, 8 Apr 2021 17:06:21 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dpdk.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dpdk.org; dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM5EUR03FT041.mail.protection.outlook.com (10.152.17.186) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4020.17 via Frontend Transport; Thu, 8 Apr 2021 17:06:21 +0000 Received: ("Tessian outbound 81a4524e9a48:v90"); Thu, 08 Apr 2021 17:06:21 +0000 X-CR-MTA-TID: 64aa7808 Received: from 48e4c1ccb62e.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 74C468F3-56C1-4E44-A091-CB901F2FEA0D.1; Thu, 08 Apr 2021 17:06:15 +0000 Received: from EUR04-DB3-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 48e4c1ccb62e.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 08 Apr 2021 17:06:15 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=A6jJYADzfx64AtjtMC6RqMxPtT/nwDXSn+YXZTaIVpacr9H85r/CWvVSmqqW2MngI4ptSKt6h0NdwX2aXsOxB/ZOhMrxFLUa4pOUHnHAE4HZrUqk+DArJZ4SwroBgbTi0uvRfCnuZ4cZKdqVhoVfU61mjmng0xwGUPKelwyQ7EOomOPwPl1dYpA0hM+uWF+7zLqcqSCRX7cSISlDjBcZucJuCwKSa22dHdmw31K/oPkWPdcXdI91u/tqvNz5YHE5Ad1kzlXID0rwMlE4ev5z8ZZLxv6z3L0Y/fsknj53rqMrEob1BQ7cU5Vg67PRxdT/pByx0XzNSDcYG/5zYOVbhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=r3Ch3s5sXm+xXg8ecKgAJFPgDvMGWyyvRJigcnACot8=; b=XmupAUNcFWgx2m8mCoEKQbLgwkAqX0ZeIkOV8r1PGD3gvPJqFoTEbNgioTjAgPEG4Unn5m24aM1nieMXnlLFtLSP3eHYHWbvP44tZ58bLHa64d5/yYVJLk5IhXUd3JmsCmfoaeDSsw1iynM5a48Ege5x5z8xwdg8OQR6f52L8n7Oo3uqNL+2OxtXSA1EdwKLkRhEMfpIoJtC68MIX6Ib/cbB1g7KN4WYe/O0WwhAdWY1ci0xnGktptNQngijP5paaCy4QENkc24It8kPU48Fcw1C0mMpAbCXs3aQ8Bjwmtud0So8JHZmGfz8qMWun3zC5QRBx5rXwR9ReNXuJVrI/w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=r3Ch3s5sXm+xXg8ecKgAJFPgDvMGWyyvRJigcnACot8=; b=2670zBxGFoayOEcuy+cwqUr+QsvOCEK7yQbjRiRwl2D+ZSeoRoOsvSOqbRy44FKBEYkT5g+L2MP5jSTro3tEwRbgDWb3Ujbwq7tv3DPbUfdBMRVuSa82KymJ6NHctm7FWiCJnSdiIn1jbjtTvU1Scd9ZJxlTk6dIKDMzFb060aU= Received: from DBAPR08MB5814.eurprd08.prod.outlook.com (2603:10a6:10:1b1::6) by DB7PR08MB3340.eurprd08.prod.outlook.com (2603:10a6:5:20::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3999.26; Thu, 8 Apr 2021 17:06:11 +0000 Received: from DBAPR08MB5814.eurprd08.prod.outlook.com ([fe80::2994:a01e:2de:f94e]) by DBAPR08MB5814.eurprd08.prod.outlook.com ([fe80::2994:a01e:2de:f94e%7]) with mapi id 15.20.3999.032; Thu, 8 Apr 2021 17:06:12 +0000 From: Honnappa Nagarahalli To: Luc Pelletier , "olivier.matz@6wind.com" , "jianfeng.tan@intel.com" CC: "dev@dpdk.org" , "stable@dpdk.org" , nd , Honnappa Nagarahalli , nd Thread-Topic: [PATCH 1/2] eal: fix race in ctrl thread creation Thread-Index: AQHXK+xS1OzYmUW/x0WQRpc2DgB0/6qq2nDw Date: Thu, 8 Apr 2021 17:06:11 +0000 Message-ID: References: <20210407201603.149234-1-lucp.at.work@gmail.com> In-Reply-To: <20210407201603.149234-1-lucp.at.work@gmail.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: 067D53EDB363CF409B4A0F256DDF25DC.0 x-checkrecipientchecked: true Authentication-Results-Original: gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=none action=none header.from=arm.com; x-originating-ip: [70.113.13.105] x-ms-publictraffictype: Email X-MS-Office365-Filtering-Correlation-Id: e248a760-88c0-4926-ce0a-08d8fab0a219 x-ms-traffictypediagnostic: DB7PR08MB3340:|VI1PR08MB3136: x-ms-exchange-transport-forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true nodisclaimer: true x-ms-oob-tlc-oobclassifiers: OLM:7219;OLM:7219; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: yeAa+JUVaNem2QdRDhmf/kwXM8Iy4dQRPQ8itHkTD6xP8NJKKET2XUE0YtKn9a/sviYafiD6riRNC5Y/NpCqqZx5ZwSJw9fLMI8e19Vyy4Jj0B5e8o+w2D8X8mmPV3v0whULawodaog16UEp5HrLZa4eHUpQ+9rnrwCLce6hk5jQCbl6muM6wDO5hDamB4x53iBX0OawoigWL6WgKwfL25+NVMv0upH6uHNC9mSU89YwGEKRkw9cWfq69W9PFX3VkY1mFxL2rwVpRmTpX0rs2KKKIkrLJ749qLpdfz6C6E+h/UEoSfPCdMn9vTLAe4XeBJaepRlBZmLVEC3jdG7Kc9d1bSEScZcOJqdcN6x7sXqzPao58eb2OAAhvW1TkpsoreABIwgwshqMGCt4DoRKlRo8a+PioGXUd7AvYZbRcWt+4jplwFQcJasoLBp0hXBPSLg/lCEhcrZoEE4qiunjWdGHTboiMilbX2GWIB+X2t2pN+D0Ki9pllPKacb8IXS883r0YCLt7K03BOT9dOZ5yOoL3jxyQpIzm6ltZcTGqipH1MmaOp4Bir5lWdA/amC22Cx4giEayosvjFpyC1MJ5iFImQT3kPNJUQfCoyHGfyjc1nNGg60Ya2ZOWgWb8d1yF3sL8k/HcEePYl91BB8HzkT6IvaloCgKLLhIiHloEt4= X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DBAPR08MB5814.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(346002)(39850400004)(366004)(376002)(396003)(4326008)(64756008)(2906002)(5660300002)(8676002)(66446008)(76116006)(54906003)(66946007)(52536014)(9686003)(110136005)(55016002)(66556008)(7696005)(33656002)(26005)(4744005)(478600001)(71200400001)(38100700001)(186003)(66476007)(8936002)(316002)(86362001)(6506007); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?jiFmdaYFPVXGRJMJjS91Jnj5PYUidk3tWE8U7ZujkpIX8/d8n75bcgycMZh7?= =?us-ascii?Q?vOhOmYGL+6L0g2b6YWw048mUo6x4ad0nvt22XPi0FhBu3G3RePA5I7/GDISf?= =?us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7vVUwAULgize1ATSAGr+7qm?= =?us-ascii?Q?AiTg4D3tzZ17GkfHm7S2dcEtoQaQ5wjzdW6xuJGJgLAFD4z0+LcITtUGDaGG?= =?us-ascii?Q?odZPnIhyz2Ilw5E/x5cX1GT1V42FhgxH36T2i6wTPTDyU8iqax+3uQBMp/iz?= =?us-ascii?Q?PKQTKfi1TIf+l3P+YvnvmM3DEiWDxfJRuM888bPnQlwWEaeT/mMxPq3ZGx+j?= =?us-ascii?Q?QsporjxnFqKsNwKQwyoevmCpGrgjJtN199cLnRKnKT01Mp4r4+x9o7zEx+bH?= =?us-ascii?Q?++y6MW42ez3ZNPmftTgx/Vqk8nKP0BbzETBSYdaiUGkcrRP+1ZTOhv+o4Oww?= =?us-ascii?Q?er7k7+o3aZduw19reJzHUP5U?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR08MB3340 Original-Authentication-Results: gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT041.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 4f28fd64-40cc-4258-f7a7-08d8fab09c8e X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: tk02Il1DRqpO6vvD/Vz5iJoYkCyDF+/kG8Ah8xtLrSY6JiHCtvU9cQ/ZnXsc1wx67ny4UnSlIuFDThLpO60Xtry4OtkoVfsT8aQGCoSi3L2UICgV+Ot1t1xowOYYNEd6fVsM/tOOfJNbTG9x8dN4ZX3hSoZ5QQXZlcJwvlYiDoxjOxb9qJ55XErIwS8EJWe34k+GBeccDB416WdaCpaGNX7Kv/XK9mzKcP8qCwEl3pk8AHsC619aOCkshpuYxkeom0BWEH+8WA+reSUZx732PdYdsSi+QqINaaK9MO+1tqP1mxH4oUnZuj8QKEzT/wzVmdlqiFe/YK8lwc6VVAl9/wPMJOjZrOK6Tgv2OHSau4g52oumf3ss9R+NIRtNj0K9SC66g2ca01X5+EO4EhOZ3mPRTSn8AffVsqELLj4B/ksRohVpGMV+lzXPFGy/fTGNnWB6gQIFyNPaXVoaDoWE4Gx+YgjgjDOvdxeQ1+t5EmraLZe3Zfmaxcz6FYYQOk8m1I50gmhXCTSHudYi4H8CNFOqx1OYevBpVftMhT58LSLTJbJhSI0WSU2jgsOcy7LKPt0siW95n9ogGBJ0Z2Oo6dDViiz8frkixQXYcyg/TgshdWb0uwAAi1yRYqo/Kgdc2xz7ehMQpXqwhf9Xuot6Gh87hZURCrCjgA67MYtfaKY= X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(4636009)(376002)(396003)(346002)(39850400004)(136003)(46966006)(36840700001)(9686003)(36860700001)(33656002)(2906002)(8936002)(81166007)(86362001)(55016002)(356005)(47076005)(82310400003)(6506007)(450100002)(4744005)(8676002)(478600001)(316002)(4326008)(5660300002)(70206006)(54906003)(110136005)(70586007)(336012)(52536014)(7696005)(82740400003)(186003)(26005); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Apr 2021 17:06:21.2903 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e248a760-88c0-4926-ce0a-08d8fab0a219 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: AM5EUR03FT041.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB3136 Subject: Re: [dpdk-dev] [PATCH 1/2] eal: fix race in ctrl thread creation X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" >=20 > The creation of control threads uses a pthread barrier for synchronizatio= n. > This patch fixes a race condition where the pthread barrier could get > destroyed while one of the threads has not yet returned from the > pthread_barrier_wait function, which could result in undefined behaviour. >=20 > Fixes: 3a0d465 ("eal: fix use-after-free on control thread creation") > Cc: jianfeng.tan@intel.com > Cc: stable@dpdk.org >=20 > Signed-off-by: Luc Pelletier Looks good. Reviewed-by: Honnappa Nagarahalli