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 BA4EFA0032; Fri, 21 Oct 2022 13:36:10 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AE35C42C0D; Fri, 21 Oct 2022 13:36:10 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id F3DB742C08; Fri, 21 Oct 2022 13:36:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666352169; x=1697888169; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=Jh91Hgc51yqpf/Kx0S4PtLEzW4X00+8On7DapkF64D8=; b=h1quFSC1h8mx+8og21vZsaupnsJi+XO1QQ2sIs6e+ZDRQ6XoUlYQ8kmW i0ttACTc6gaBX7xwfUGmn4qlSZ6PVHZGuPfeqkXWDtP1qkF5ZBbBBlc2/ vXTII0N/RWXbv/Dgmk7FhRJg+kUlm9NVeKf1jLus5Zj0+wj4TE6bObCMb G58O03IA5c8FvzAKv7wTA4kuf4mDEJXnzpf8gtxVK8Yyplt/6l7IiFx0m lE/n9+IXVmyxxqjKaPCXsRJ0X5D8C0jUaZck799+oWxwAlsXX2FaGMNJI +GlQI3H6exERQXSPtCn4Fp7HRdFNQboTRsa/NFrapY1pbCsbrMi6H0N5E g==; X-IronPort-AV: E=McAfee;i="6500,9779,10506"; a="294379370" X-IronPort-AV: E=Sophos;i="5.95,200,1661842800"; d="scan'208";a="294379370" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Oct 2022 04:36:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10506"; a="959582476" X-IronPort-AV: E=Sophos;i="5.95,200,1661842800"; d="scan'208";a="959582476" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by fmsmga005.fm.intel.com with ESMTP; 21 Oct 2022 04:36:07 -0700 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Fri, 21 Oct 2022 04:36:07 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX612.amr.corp.intel.com (10.22.229.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Fri, 21 Oct 2022 04:36:07 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31 via Frontend Transport; Fri, 21 Oct 2022 04:36:07 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.174) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2375.31; Fri, 21 Oct 2022 04:36:06 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=B6AK61ZXl651FJwdPQE7xxB5+JVVNmGP1ltIDkxyqbDvl8NFfA5qC8Em3sY1E7PO5kyrzF5HcBbLsyba72khFdyiFJgiGI/+RMFQUwo7ZQQxb++gIpx9jDF6uUzTHQZU9rdB8Bysn9ruyeQabYZFba7RoOrmdaeL6xZNvjGVLo3fgVfinYg7RyrP7F4tayy9wyez8H2hFzBhTrZFyZKH5GZAs5xWWq5lp4BF2UCwbdfqp9RVDcP+U9WtbOJQTl6kspUePirOozbQxazJ/RjDLG8d9sg4/EDVrBbjO53GlsH0/VNAc7fxfJR3/fjgTC8LZfUocpEhz5+3MvE8GRvgSQ== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=qFZg9BqEByzxR2h6XeTz+v1mtTSShM50QDetKoIdiRQ=; b=FAoAveBqfO8ByYdPOJnXywhYeS4lW0o14o/cYDMQAXvfjq3fdRJeywphZqur2SXpAkti5UH6aRK0FV/d2wwZx9PBXSG9mgpYIyg278jIbueHGdj8JAa6Oba3SA2L4diULtncSN4HgufvjUkYXKC9CMnc4OwO468chQj4SOEnE0C+6tAYOMmSy6u9b1vMWtWJrgcYCttCpWnWcr3NUkB1iEmk//thwdrgKVA+jaI2kvtnsDaltpPNHoR1iujfuz4qSXTAbBPYuo15QpZRUPshjVsCWA6g9WnXqHUIUg2J7bGwuCdpssZMKUsxvh8opbgkf6M+2W3v9ap/knGobtC0rQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from BN0PR11MB5712.namprd11.prod.outlook.com (2603:10b6:408:160::17) by BL3PR11MB6316.namprd11.prod.outlook.com (2603:10b6:208:3b3::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.35; Fri, 21 Oct 2022 11:36:05 +0000 Received: from BN0PR11MB5712.namprd11.prod.outlook.com ([fe80::8938:3719:8c0f:ff97]) by BN0PR11MB5712.namprd11.prod.outlook.com ([fe80::8938:3719:8c0f:ff97%6]) with mapi id 15.20.5723.034; Fri, 21 Oct 2022 11:36:04 +0000 From: "Van Haaren, Harry" To: "Carrillo, Erik G" CC: "Naga Harish K, S V" , "dev@dpdk.org" , "stable@dpdk.org" , "thomas@monjalon.net" , David Marchand Subject: RE: [PATCH] service: fix early move to inactive status Thread-Topic: [PATCH] service: fix early move to inactive status Thread-Index: AQHY5Lahfdo7nddX6E6dXfIoksNOJq4Yt2jg Date: Fri, 21 Oct 2022 11:36:04 +0000 Message-ID: References: <20221020190041.2350842-1-erik.g.carrillo@intel.com> In-Reply-To: <20221020190041.2350842-1-erik.g.carrillo@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.6.500.17 authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: BN0PR11MB5712:EE_|BL3PR11MB6316:EE_ x-ms-office365-filtering-correlation-id: 335c4e07-aec5-43b7-10d9-08dab358704f x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: wwqCa9QcYFckUCP+8Bi9X4Sv03SoPsHgzyJAXNxv/wwqXMKWM9RmMky7gsAPe863NaP2Oz/ncnMqPVAhjFmUQHotK8xECJMwkSoJKywL4czpXDnafQvmGGafoY9/2CZBeqs2ZzNUe+GTzsIcz4xgzKqfmfTGn7wryTERHfwAiMSYLTpViop7Bx9JCqBI+kz7WrP9cBPNN97Hyk3JjRlH+4oi247jeEfGzC9Lj3gHXHkP6PTtcfIfdCTNyJswhxDpW48K36shkULL/u1+pPhcrfGLeJpo5uPQoc4CSb/FXrlUlii/GiJzOcuCyliKvtt4byy1H6nzWB4FSy3yqpQZtNNPS/lvOOI42o57Sv5BYCgVjyLzZ+qv+Ak7MCuCYBXSLFUFcef3bFA7eDfXH9jc6f+ct+z5Qp3XWguzEdgOGAkvgLa1D2gB+pnl2UaLqqaQP8YblXxOIEQMSs8olp8RTt6JQ95t8AGTFZrLVBR0cYnc3jxWMrnVxgG9SUdiMf8WKJpKyu0ao/sEalrprlpBU0f2ebWX8DUKpWGs72K7sBL/qDg//xJK8fjqcxXzA36N2l4I/fDaYTVypfwRXKosoayqesS+lLTuQy9n6rnmuweqkwYZp58Q1srL6QdCikLk+7FZYddGfW9DYc4KaSJbveZRIZ4fDTCyGOiGJL+Kn0mtgEHV/8q0UNO0f1BRKi+L2EWQHKsJ5/HrDG3ujxTnYpnddjvvmvLuusqMOVTDPvmWImp6M+29yaSZKj4qKSQzhcaxAvgtFMyTCg/L+iTaPQ== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BN0PR11MB5712.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(396003)(136003)(346002)(376002)(39860400002)(366004)(451199015)(2906002)(71200400001)(186003)(33656002)(478600001)(38070700005)(83380400001)(122000001)(82960400001)(6862004)(41300700001)(52536014)(86362001)(8936002)(54906003)(6636002)(5660300002)(26005)(55016003)(9686003)(38100700002)(53546011)(4326008)(8676002)(76116006)(7696005)(64756008)(66446008)(66476007)(66556008)(66946007)(6506007)(316002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?jDhhXpHr+skgY52rkvS2Nseh3vgKt15DwbJu5M4V11uWPBAMCudy3w6ClhGf?= =?us-ascii?Q?yvc8Wf9Bh5H8OnMylXyAMzo/WNYXmBI9X38uVzWTNatJ4Ht0yA4KtaXpu6bT?= =?us-ascii?Q?NjVW7YTpzF5vB0BxlSH0MgwaAUmGO4qf38s/PabgrwdD1svYv3Q4qvJiZSTT?= =?us-ascii?Q?YOaGDDNUGWTbENcfdlVUOZrBBetRd5wlnyHizP9EJkFzTaExvrP7lJERPRty?= =?us-ascii?Q?rVcOQa62zPSd3G7OHj8Ep1+ei+rAPg8KDokWjv3VBH4jHgMyruy8voltpiIr?= =?us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kMRqCzdv7hvMIP53qHas2uB+wSZ?= =?us-ascii?Q?0yhvYpa/KcnKD8KLX0F1TLem/fx66p8gu3mI3URtpySr5sOLYNqDbhcrICbX?= =?us-ascii?Q?ErHOR+ZZdw+yYi1X9YBOzS/Q7JAmQx3ZtsWESf1UJszZXXv85tsJUHeZZ7WY?= =?us-ascii?Q?Em2H2rz8P35CVoMmH4KLktSUn1QcLckqMoltu1zkHtYhP+cnu61W/SQJjtG1?= =?us-ascii?Q?wifoR90JsZO9lmdSxukx8QXuM75jWe0/qWyyecw238Dk0lcwDHLFeesbQvOd?= =?us-ascii?Q?rj20R2zqsB6xYej3dW0OcBY4C2BC3GfSul9xK74MCkqzXRRHAkRvgWY7EEFN?= =?us-ascii?Q?+IeGXkh36WOG+ikqiAS7VoL+rdUaHST3pM4VQbP6DufQTkr4P44wFkpwNLET?= =?us-ascii?Q?/QGyK9TY4m+y0Kcx/w5uMy5BDcTQv/rVR+MXZH/XgPEplPHTBxjYfPeteHvO?= =?us-ascii?Q?oA=3D=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BN0PR11MB5712.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 335c4e07-aec5-43b7-10d9-08dab358704f X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Oct 2022 11:36:04.8914 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: ctaz/8baXEwHutVszrGt8rba4NETYOvZQF2mMp6d7lNjQULiIcOueZESMDmkkCg0XfWK8rzrwZb0bUaLUX/VFUJzAzwpI0ajZNmbD9jbKFM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL3PR11MB6316 X-OriginatorOrg: intel.com 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 > -----Original Message----- > From: Carrillo, Erik G > Sent: Thursday, October 20, 2022 8:01 PM > To: Van Haaren, Harry > Cc: Naga Harish K, S V ; dev@dpdk.org; > stable@dpdk.org > Subject: [PATCH] service: fix early move to inactive status >=20 > Assume thread T2 is a service lcore that is in the middle of executing > a service function. Also, assume thread T1 concurrently calls > rte_service_lcore_stop(), which will set the "service_active_on_lcore" > state to false. If thread T1 then calls rte_service_may_be_active(), > it can return zero even though T2 is still running the service function. > If T1 then proceeds to free data being used by T2, a crash can ensue. >=20 > Move the logic that clears the "service_active_on_lcore" state from the > rte_service_lcore_stop() function to the service_runner_func() to > ensure that we: > - don't let the "service_active_on_lcore" state linger as 1 > - don't clear the state early >=20 > Fixes: 6550113be62d ("service: fix lingering active status") > Cc: stable@dpdk.org >=20 > Signed-off-by: Erik Gabriel Carrillo +CC Thomas/David, please consider for inclusion in next RC. Thanks Erik, indeed the "active =3D off" store is too early in the current = implementation, so: Acked-by: Harry van Haaren