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 91F8CA0C4C for ; Wed, 21 Jul 2021 08:21:56 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 836FC410E1; Wed, 21 Jul 2021 08:21:56 +0200 (CEST) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2055.outbound.protection.outlook.com [40.107.92.55]) by mails.dpdk.org (Postfix) with ESMTP id 9EF9D4014E; Wed, 21 Jul 2021 08:21:53 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JEXwXUjPeMKnBJQOLnK2MeilG1dURv7KbUcA0FAfdLqXAZzqE4QcFiDIsjfm+js1ifu18DYWUVm2NzveqIbDht1obAQA5nHyVJl7aP02a/FJn89ILzRF07dD5K9MZjPezLpldMBxYMqvpxdxPckurQBVqB0C6UYwpkbOrCTJ2wAqwtIVkWh6Lc+wLRYgvkuGmRG2lQC3nl+WszW16C7bI0oQNuXADbsu8Tmps2DOe6wZTx9Z4rR17ozJX8iUXeIx4GQVfWgmURgpwqD12rorctMkhiUriBat4IjgVAwzWp+b4vwnhkAOer3b7fF1J56GJIeo6T4LuwRVFL/olJE33A== 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=ZJaYSpj0fIB1Z3mWsgjYzRwK1p/USulf/Yn9h6u24wE=; b=eZaYW1omjC1sdN61t9uf444sUoypKm//oENqI9P/550kfg19H0aDAF6GnPSMJeFhY/uQMsQW1cMsTz6ygvtuaFwrjCCVv2SRpaHODlT8S/CzFm8xmXqqv1jsUNJkCCxQcMhgh8HWl8LbX9wA6nEblMRp4AHnmZD9XpRZ7B/6lgDY+k/8BSKXV8kYqyKPOzKp+0W96QPZQuQHGOGj7JEaTFiDMYk7+TW7k8ZAcp5cw7GVp11II0tUJGzwX2intaEL7epK8TVgbGGQrNz3nTTiB3r/gCQmSZWlBmfGuJKDmXtYIwTCSjZ/DwGxtt/tavdXZYS6/O/ycL4TSi2PgkEozA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ZJaYSpj0fIB1Z3mWsgjYzRwK1p/USulf/Yn9h6u24wE=; b=pd0eBJgFCHVEu8y/cQDlmFXBmGow63VmhH2Wj6oZLXRpImernDbOxrjezEf/HAB+fmx/JIgnKbOpn/2fD7klQzhPu+Z9VzVpJH18x1sN6y9gowwI/T1yGdl8ksqmnugv/NW+3yMBpsitnhVz8KeMbWN212kYqEkUpEDsvcq6AvvYmphWX1ykkr/NYFcwRA9QhyNU8KA0opeSKfQvAiYLWfChfm7qR9KrsSjGozl7SPpZlI9agZi1cCFDOBIyQBtKbXGFpV4Jfv7h2p5oVnjn/NAtTByu1Askq83r1lcCDX1pisPT8alizqMLXMm4pwu/p+NC7LCXiHAcPTRKQxdNQw== Received: from DM8PR12MB5400.namprd12.prod.outlook.com (2603:10b6:8:3b::12) by DM4PR12MB5375.namprd12.prod.outlook.com (2603:10b6:5:39a::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4331.32; Wed, 21 Jul 2021 06:21:52 +0000 Received: from DM8PR12MB5400.namprd12.prod.outlook.com ([fe80::9cf5:169b:e9a5:5811]) by DM8PR12MB5400.namprd12.prod.outlook.com ([fe80::9cf5:169b:e9a5:5811%7]) with mapi id 15.20.4331.034; Wed, 21 Jul 2021 06:21:52 +0000 From: Ori Kam To: Michael Baum , "dev@dpdk.org" CC: Matan Azrad , NBU-Contact-Thomas Monjalon , "stable@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH_v4 2/3] regex/mlx5: fix leak in PCI remove function Thread-Index: AQHXduyRnIXMuyOQCEOU0WhEtgu58qtNA2pw Date: Wed, 21 Jul 2021 06:21:52 +0000 Message-ID: References: <20210707120303.2490006-2-michaelba@nvidia.com> <20210712070644.2848418-1-michaelba@nvidia.com> <20210712070644.2848418-3-michaelba@nvidia.com> In-Reply-To: <20210712070644.2848418-3-michaelba@nvidia.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: nvidia.com; dkim=none (message not signed) header.d=none;nvidia.com; dmarc=none action=none header.from=nvidia.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: d5e60628-bb23-452a-8936-08d94c0fd489 x-ms-traffictypediagnostic: DM4PR12MB5375: x-ld-processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:669; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: ZpoGt+ZAmeu/uVfTX2U/kPLKr82R5jB/p31KAye+Ul0kFYPwYHigL0qT4XXfZ0w5DHF/X/VyPKzzmBuUynwbwsS1f9bghjBRodWsDakiANXQxX7jjhQ87olvkOca4TMg7XwWXsQkOmzFgLf/YHvL4EUggQTCduhvkWFhCPmTvBoPbXlIrn2yPBqlo8IAsI9vJ8TgLf8sKG3vQqKN4YX24/AtjZiBgp3pRVPMgXsXyc0AtoU+XB0zY5cFvlKHqDFqUjt+VxdrpFycSeu/v1wuSmRzH1Ui4fBB4BPmwbuXs1/92l3isNMMRdR4nmpDCjf0RiU3zD0n3kYBDm8Pk3x/+JWMyyERQDfOuHys0gQ1e48Aj6rcLTPyU6+r6CEPY/g9AIvbB3WrORzOpdKBjXgI3DHC41RCyYXJSIaBZ/TR76TRiaaNCTO3eZogFmck2DaUiDC3PKw9EDr0uAIzOtlLJEUXZc3d/Oufi20bcYFVJWuz6TgW/chulcabyBN4yJRTCYHovpIu/hNEBsrqaodH6wdnnz3ky4/9kQmrHLlepJm3kH/7ZX5x29XLtQQ7NdIyOvbqRimXVOTuVqEtgcHaoK6djE/4Ghnz4aohf3Uuh788kHplj5IfzKP48oc6nve2v6CTcnZ8YyU/N1mFmo6sUds1jVIvCaE+LlhBcccKeXubU4mub4vPBmP/BoWRfYCrq+Sl68Y49ozD7uq2pvBE7Q== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM8PR12MB5400.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(346002)(366004)(39860400002)(396003)(376002)(54906003)(86362001)(64756008)(76116006)(66556008)(66946007)(66446008)(4326008)(8936002)(66476007)(71200400001)(478600001)(52536014)(7696005)(186003)(6506007)(5660300002)(2906002)(83380400001)(9686003)(33656002)(38100700002)(110136005)(55016002)(8676002)(316002)(122000001)(38070700004); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?MhFjxYepS7oDFJKnkAygn0A9M89StLiptp0NUbaLV0lXNUofgVTGtXnkatXT?= =?us-ascii?Q?wjq+PKcJWjFrh9tf31WXOPmeZwQnIgqAn4U+50nEqizjmZxxnheRFKd5BKYo?= =?us-ascii?Q?t1VhRhQpNjZPDzQyYmrvcMWt42NnonloPsu2mKRBj/ZesTNb8M6jK7gDqcTc?= =?us-ascii?Q?y4yS+wGBy/zBOT5YADVzIhGAKt1827XNijbqZVqDMbzNDhwsnkluDhHqKRyf?= =?us-ascii?Q?mKJRZhJH2KLEdmLr63T6OvLEmEmUcAKIow3QDuLW6YDw0wQ3M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arBP0rbs1Ic0JMpZ8IYzU3u1Qdl7shEGw3d/rozf0UeZ+KRrgejGBn4s4oL?= =?us-ascii?Q?nrSEvSL3VGwHRga1tf7bDdGKbqVejMsX0Ndl5tFQwUFJcYi5dOcTEYHhAXUy?= =?us-ascii?Q?NSMyMPysvDbrn06vuAfWG03MOere6tv2BwSxc+H7RQKCjDbFWm1UkqmPUpGd?= =?us-ascii?Q?0Gidl0t88H9RrrtDUstV2AMWtFDR3MK4vQHcFkmHoHu+3JTiYS4XvgvzDYV+?= =?us-ascii?Q?DHHe+WzP8FZoI+VKnDYA79aP7App?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM8PR12MB5400.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d5e60628-bb23-452a-8936-08d94c0fd489 X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Jul 2021 06:21:52.1319 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: oyJPabjPRr1jAtluGH00RepRDPBUj33YcQE/algz/YpmHlVgWIzhQZtyZq1UCldGUnGbdWzjsTdZPbNNDlXlGQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB5375 Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH_v4 2/3] regex/mlx5: fix leak in PCI remove function X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi Michael, > -----Original Message----- > From: dev On Behalf Of Michael Baum > Sent: Monday, July 12, 2021 10:07 AM >=20 > In the PCI removal function, PMD releases all driver resources allocated = in > the probe function. >=20 > The MR btree memory is allocated in the probe function, but it is not fre= ed in > remove function what caused a memory leak. >=20 > Release it. >=20 > Fixes: cda883bbb655 ("regex/mlx5: add dynamic memory registration to > datapath") > Cc: stable@dpdk.org >=20 > Signed-off-by: Michael Baum > --- > drivers/regex/mlx5/mlx5_regex.c | 2 ++ > 1 file changed, 2 insertions(+) >=20 > diff --git a/drivers/regex/mlx5/mlx5_regex.c > b/drivers/regex/mlx5/mlx5_regex.c index 0f12d94d7e..f64dc2824c 100644 > --- a/drivers/regex/mlx5/mlx5_regex.c > +++ b/drivers/regex/mlx5/mlx5_regex.c > @@ -280,6 +280,8 @@ mlx5_regex_pci_remove(struct rte_pci_device > *pci_dev) > if (TAILQ_EMPTY(&mlx5_mem_event_list)) >=20 > rte_mem_event_callback_unregister("MLX5_MEM_EVENT_CB", > NULL); > + if (priv->mr_scache.cache.table) > + mlx5_mr_release_cache(&priv->mr_scache); > if (priv->pd) > mlx5_glue->dealloc_pd(priv->pd); > if (priv->uar) > -- > 2.25.1 Acked-by: Ori Kam Thanks, Ori