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 A4814A00C2; Mon, 22 Aug 2022 13:29:57 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5934140DFD; Mon, 22 Aug 2022 13:29:57 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id F200540694; Mon, 22 Aug 2022 13:29:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1661167796; x=1692703796; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=eSuaUDsohDnarv1nOirmgyVniUPZvK2BRI6opRggAjw=; b=WFjEqVUHR/ztMcyk6ze0v30MHU79nZFmq1duDpLwiqBO91KVZotYb3+/ VJ45F8EQQMmzxQ7c8WVNeALrXL+CsJfmNsAxC8vhnUsJ2oaxC/0taqEtd fVRbFlwBAIpL1K9L8SIFK/qKTeg/jAaQgxsFDz7YRb7UeTajdjDwGOIAv dOdoy6Jcqb+EUOJyu6zw6ZQMTOIWVa59wOsUDKfneHLzVTzo02OguU3HV rvBgMkzWPZ1C44TQsHil4sFtL7qUsxtub0/CqRJA9zvInScYQ0U9PKy42 jCnXYTMeaG4N/Yom6zxV7W3QcpKvHaftU3RVnkcp1kSAX6qOYxbu+5OWx w==; X-IronPort-AV: E=McAfee;i="6500,9779,10446"; a="293387161" X-IronPort-AV: E=Sophos;i="5.93,254,1654585200"; d="scan'208";a="293387161" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Aug 2022 04:29:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,254,1654585200"; d="scan'208";a="605267575" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orsmga007.jf.intel.com with ESMTP; 22 Aug 2022 04:29:54 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Mon, 22 Aug 2022 04:29:54 -0700 Received: from fmsmsx608.amr.corp.intel.com (10.18.126.88) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Mon, 22 Aug 2022 04:29:53 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx608.amr.corp.intel.com (10.18.126.88) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31 via Frontend Transport; Mon, 22 Aug 2022 04:29:53 -0700 Received: from NAM02-BN1-obe.outbound.protection.outlook.com (104.47.51.43) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2375.31; Mon, 22 Aug 2022 04:29:53 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XLeqsH76QOhwoABMXERlIkxluNcf7ZDCzHMCOvDYKBX8n68gru4bpdPdA9a0AW5gFmCdA7jgAlQNWC9C/tdI9clOe4sdze6YCWgIwrkXZ+SzeZPvENMJZu46pHb/b1v0n/llH6ZRYvKIJ/xjyabZqWB43ZcOniTK/DOG/tjhID3OcsKnqFnoMn8irf+zEIXsY/SoUgGO+0ZfjllOhlIdIgbqxSlH9KC6JHuDB71qcXwUK1hFzefcR/7kOQDDl++txO/uJAZeQllgV0B5+SJwWy3BpDvHnSAolxH37vLI/GTcoK757Qovghmh0lpu7pVav7dyARksirceAL/wC5lFvw== 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=eSuaUDsohDnarv1nOirmgyVniUPZvK2BRI6opRggAjw=; b=ZkD3d9Vq69PpRdqWc34I2DEHFfYbWZmMeklcygYAMJznQXcudSrkjirXSdzrd3gHEEy/f2cCJ11rwwPdXuRBQ32TgL2oc6LK9MUosQa/bSkplWXgf0fXzWhMXjsCM3y3hYRXXgkVD5GWqBoDr3VqdzGTBdQ7oetzdwfUOUV+wdOk1Of5y4LmR6y8+Li0ytcVz9+vSQ2MsXvjQRkVd9aafUbuDEo2hBy2PMNxQ9PrCFLjndeWOe+uCR22aaVaP9X6tOBL7byhf4II5Cg5e5ZZ3nW8HkGKDiCpNUEv50o6aNTXlQCAkDIG4XgBvAvHAr9mD01TMxCbIhrA14udWwCTQg== 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 Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from BYAPR11MB3799.namprd11.prod.outlook.com (2603:10b6:a03:fb::19) by SN6PR11MB3101.namprd11.prod.outlook.com (2603:10b6:805:d8::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5546.16; Mon, 22 Aug 2022 11:29:51 +0000 Received: from BYAPR11MB3799.namprd11.prod.outlook.com ([fe80::4959:604c:ca50:38b5]) by BYAPR11MB3799.namprd11.prod.outlook.com ([fe80::4959:604c:ca50:38b5%5]) with mapi id 15.20.5546.022; Mon, 22 Aug 2022 11:29:51 +0000 Message-ID: Date: Mon, 22 Aug 2022 12:29:44 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH v4] examples/vm_power_manager: use safe version of list iterator Content-Language: en-US To: Reshma Pattan , CC: Hamza Khan , , , Reshma Pattan References: <20220708085141.925246-1-hamza.khan@intel.com> <20220822105855.6180-1-reshma.pattan@intel.com> From: "Hunt, David" In-Reply-To: <20220822105855.6180-1-reshma.pattan@intel.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: DU2P250CA0015.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:231::20) To BYAPR11MB3799.namprd11.prod.outlook.com (2603:10b6:a03:fb::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 250d3522-1a33-400b-a0a0-08da8431a0ad X-MS-TrafficTypeDiagnostic: SN6PR11MB3101:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: RJkPZLvrQutk3UcfuCMROWj1HBTE9r7hrJ6H7RJRwYEQjFB7U2ZgXgpPg//Sc7eXTvZ+Px62JpBrh9ilmrrp/HozOxDXBS8jiHVabB9ArfQf4WRMENnTIEnXTTSPYF0XWyO3CKa/FEvL2yAafF2rEQO5bVuIH+cbJ8Z48X95E2fanUQW0RItxRX5dYienZi1q9db5Em/h6dpm70dgTOysOmg+biYrcEgLgtnWx8SkPaAj1wP4VVtC28pd5d2gKoM6hUlBS8Ism78BFsJ1trOQy7hm4U/F8SkdoYm5XdkXFU2VO2NeqPmYC0ZKkJ27BsS4h1gUq8OrIRx5xzc1IuAAbAcMG+dJFeL60VD0kpi5W7m/NOVAbJDW6H6AU9fNztnT7K6olP8yLPW348JR7hFOoTjlpk5Q0iEY/JddBim/SSbVAoFsanljOyU1Yt/0sHxP5IVuNNJrVWDy1NGtVEposuuGy5Hoc7paNrPBiJUkNXj7ZCAPoqZ7Yv4jrwI2I+V0L6nqEYEuf7NaJaWIJ+M9JJk9X+ZNg35vk/T72Bqjj6btFf04WVWnWV7KD1SMfB/NebukP0nMvzNPtvYmVv0WLisEKMEZ0A4lZFTcEj8/aiA2oYeQm6MnvQbALHrM5NScyNlSn9cadHqL7IWHmiSE8Ufl8SFDEtgnzStP98oq6k0xa932OEHWGRAFiMY/n5Upm8Dw6kzb54xH75O4i/KVbvSyULLEvQpwaVUonOPevQfXCv+wevWR9OBj9H2+eVndyOQMgwZaVdbvkk13eIF3ZrHZrnQFu2RDJPd/BLBfZo= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB3799.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(39860400002)(376002)(366004)(136003)(346002)(396003)(6666004)(6486002)(26005)(53546011)(6506007)(6512007)(4744005)(478600001)(4326008)(66476007)(5660300002)(41300700001)(86362001)(8676002)(66946007)(2906002)(316002)(66556008)(31696002)(54906003)(8936002)(36756003)(38100700002)(31686004)(82960400001)(2616005)(83380400001)(186003)(43740500002)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?Z1B6QkVqSXVvbVdoeXUyL1FNOTFpajZEc0loc1NEWUVOOUZzdjk4L0EzU3pY?= =?utf-8?B?RTNCZm5BelEyODdVVXZMdWxKYWhqbk5ZMUZHRlowUnNBR0lNclpiYjl3YjJr?= =?utf-8?B?NC9qUk9QbW0zMVVZYm5DV3g4ekYvY2VtbXp5UEVSNVNZZTE5d1plQmQ4Rkl4?= =?utf-8?B?NC9XWmI1UGV5aFI2d3g1dEZJY1FGdm1TbjNwdGlMTnVrYUdVWVJ6VklkVENn?= =?utf-8?B?Z1pHOHE4WVhIMkNhQWNJSkJSMW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?utf-8?B?Ujc5eFcxTWtDVFppK2lBSTNESVNVdEdSa0M4ZTRzVFcxOTFpM2Ric2xpSGxK?= =?utf-8?Q?OC8kCAEVDoOs/QzWAgPVZSTJC?= X-MS-Exchange-CrossTenant-Network-Message-Id: 250d3522-1a33-400b-a0a0-08da8431a0ad X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB3799.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Aug 2022 11:29:51.3156 (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: 1zCKewYT/n/CjYNAYGXshG++iejELAoVw/M0Ml9TU+wnhKxrEt55W95j2lGDX0EugQlAHX8w/bVlK0Kx0j4FKA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB3101 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 On 22/08/2022 11:58, Reshma Pattan wrote: > From: Hamza Khan > > Currently, when vm_power_manager exits, we are using a LIST_FOREACH > macro to iterate over VM info structures while freeing them. This > leads to use-after-free error. To address this, replace all usages of > LIST_* with TAILQ_* macros, and use the RTE_TAILQ_FOREACH_SAFE macro > to iterate and delete VM info structures. > > * The change is small and doesn’t affect other code > * Testing was performed on the patch > > Fixes: e8ae9b662506 ("examples/vm_power: channel manager and monitor in host") > Cc: alan.carew@intel.com > Cc: stable@dpdk.org > > Signed-off-by: Hamza Khan > Reviewed-by: Reshma Pattan > Acked-by: Reshma Pattan > Signed-off-by: Reshma Pattan > --- > v4: fix header file inclusion > --- --snip-- Acked-by: David Hunt