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 EF0A0A034C for ; Fri, 4 Nov 2022 10:51:51 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E479442D1A; Fri, 4 Nov 2022 10:51:51 +0100 (CET) Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2076.outbound.protection.outlook.com [40.107.215.76]) by mails.dpdk.org (Postfix) with ESMTP id B8F1742D0E; Fri, 4 Nov 2022 10:51:49 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MGfD7l44rZSqwH9kZzxDUCdlJsT/TahJwDvWvjtHG7l597C+Azi3njbJlnZh7SaXOkP18pzhxqIvmXcHgtJMxDbpZSvnxmPfEsMh3OTeTKiLG8LGlb8+XcMLO/4MEli0BQ/FWkOIi0dht7zMCpSib+q778aENcgnVNHS2li/13FzsGErUCzS/9vFtHk7hVnH9TgyEMeqymvazyWTsT8yQWGtbCisfx79So7DfvFhFE9mqBu8dz5AQebs3gDSK3B5//jL7bY12PuCCwU7K4fXirvzYHVEk1vfTzRQS2G7x8GKCjaHzS16UELvVoga3UREZGq055DEEDKMhsMG5Kgfng== 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=NcbGVKWWG7THNfXAHBw9I84QHrmrVOhzkL9M4/wxyXQ=; b=RNlZTP8BI/XdK45m1OnuDEkW7bITSMtWNqTQ8mQ+NoinOSQLGk2wKlXoB9YVhQfwUWOP2VT4jmI6h6d+9SLwkHU3n87/knNAFFRJ/bzxgp8BaI6cs7TofkVvhag6Db/de4YXVX/4sHd80XMR8XvuxMrOQ0msGxxgHhEwCQg6kHP7k9vQL/EW5iAfn31DLiCCzDpFE6UXzBHVkiJA01eodrNWsQHyUlV2wHITVbgCCPFIeM7WizFHDvB2Mjc+vx2KrgEb7eF5xKKRqgPzWZzu6T7q6dBP+2RUPbOB21ramokTnCyz+/R7Z45nH3A8FJSllbkA92PHxmBxz9Vwd9O66w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=jaguarmicro.com; dmarc=pass action=none header.from=jaguarmicro.com; dkim=pass header.d=jaguarmicro.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jaguarmicro.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NcbGVKWWG7THNfXAHBw9I84QHrmrVOhzkL9M4/wxyXQ=; b=kQ6vrPbzTw50fJfGqcv+y1A3lSHPNBTusgtVLVE34Y759ZfZ/bJtlnbqwp++ng5C3zioRl6F9ipVFMjsds/3ftUn6X6VmAbmMmENdkT7VdTCf8SCyGupPf3wWmrL0lDg0PGPMfjKVarbilbb6dyvbhFzwJx7gohz+ViBJY+FHW0cKzQ0z0iKSXs8J1NX0baFfiIOjHYZ93Tt9SPXCcaNGDjELm82znPuf1gJ1B6nh7HxadGKnwWlwZbhxxfcc+4nFArLIlHj+IxNtLRprtmBSCbsG4k7Z1UH0gxQJv2Xrhh9b2h64zgwfEmYpjI4I4UoZOjCLemrDNUzI1dI5tDe2w== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=jaguarmicro.com; Received: from TY0PR06MB5683.apcprd06.prod.outlook.com (2603:1096:400:273::6) by PUZPR06MB6032.apcprd06.prod.outlook.com (2603:1096:301:116::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5791.20; Fri, 4 Nov 2022 09:51:43 +0000 Received: from TY0PR06MB5683.apcprd06.prod.outlook.com ([fe80::ec14:4ebc:de4c:88f5]) by TY0PR06MB5683.apcprd06.prod.outlook.com ([fe80::ec14:4ebc:de4c:88f5%5]) with mapi id 15.20.5769.015; Fri, 4 Nov 2022 09:51:43 +0000 From: Jun Qiu To: dev@dpdk.org Cc: yipeng1.wang@intel.com, lei.cai@jaguarmicro.com, stable@dpdk.org Subject: [PATCH] hash: fix memory leak of hash_rcu_cfg Date: Fri, 4 Nov 2022 09:51:23 +0000 Message-Id: <20221104095123.487630-1-jun.qiu@jaguarmicro.com> X-Mailer: git-send-email 2.25.1 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SI1PR02CA0002.apcprd02.prod.outlook.com (2603:1096:4:1f7::16) To TY0PR06MB5683.apcprd06.prod.outlook.com (2603:1096:400:273::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TY0PR06MB5683:EE_|PUZPR06MB6032:EE_ X-MS-Office365-Filtering-Correlation-Id: a2101fb2-1589-47a6-d4f8-08dabe4a2db8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +gp1r2ArcSxzzEHIoskFnbWf+kyALKFzPYPbsoGCIFm4GqiQtQGreiJtPRHzdzR9kGs2go7giVGzuzvJPmnWyMds7CWDVAInRPFR7ZyqKjihNw/fVFeAKRS5QQ9TVtboxY3t9Gz1n2b9ib01qKU73fLldkKt3VEvtpfPEWvw+q6tIiycMVbw6M7ASgf7kN7IEXNPRX7D0WTKp9j0YrmVKzoBP1/E9E2PoGbxHfEMGPWCmnn6wR+L5w9hj/ULY9/MvlFKGOAzRmpAG1pYYNhg3NnkwiUNpUCVGLdOWV+uv4A8iYh2TrD9MpdjFx88GgfLC58XNIooYj5Y+svPZdm7Fyaz8/42cDKqG2TL7klyLtX6xPDvrkAwYe495k+9Q4smlf1C6+Oh140VpP1YeUqbRrifLXBRv21SP5RI0K6R1FoRq6+PTMeQHW65AS7b8Dt47l8wiKz1iuvu8jTXHz5xkMUgf6oWIeWzzG7dHrqPg7MuTnWHvA6V28fuC+iI57u/e8hoH0oaJrgmo9QDRB8QDz/FHSj3vGqWKpunj37Gzl2WTB2GW4hAyp4shyFaj5ocuIxuYx/q7Zs0Je3PUdSJqpT2j+R9u6QILJXbqcNwtjJmBXhnXPuYO2Jx7TDCSG85xFz/plr10aUWXehS46JTUXbKvJbmTtoTXsyVyDi8UISBpadYgV0Hr8xX7JL+pYdsTw/pfX4m/KmdRXFCY9C1W4oFXN7kPMqbNrrqZ90abW16TBxj/6chLVtkESKdr02ksOQziKEqwVHfv0VuHUmzTw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:TY0PR06MB5683.apcprd06.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(376002)(39840400004)(366004)(346002)(136003)(396003)(451199015)(186003)(478600001)(66946007)(1076003)(44832011)(6916009)(52116002)(2906002)(66476007)(8676002)(6486002)(6506007)(8936002)(26005)(41300700001)(2616005)(5660300002)(4744005)(4326008)(66556008)(6512007)(6666004)(86362001)(36756003)(38350700002)(316002)(38100700002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?ZuNJ/B8pHvVM/wx7neyQLwqExqzsN4L4o4D4kwBvbC3/sFZbIDS6fuFIU1Su?= =?us-ascii?Q?CHVhd4fL0DPbKKiWxsiXjhYjM1t4j/iZaT6phoSFRziZ3IM0Y75sA39qux6r?= =?us-ascii?Q?jCGVoPVd3v2JRGoEBaIv1Kyrn3c5QevF0un6sKVchz1Hc0rNOJfSuYTBXgTu?= =?us-ascii?Q?C1hI7uEWTSRNNJmMUkfaTbyVTAmmgWhcrGYqz3XlCOKgmD1ix8nc0iw2OMSN?= =?us-ascii?Q?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dXDufT0B+?= =?us-ascii?Q?pfAfMJN9Wf6VuyGirw2B9IIQkUupUp/VP7b+f7ejQHJXVPL17MOWnoVQhAT3?= =?us-ascii?Q?K8un/MdrBHC1j2OnVFwSF5GuQn8XbBAJtDBKn6O1W2dUtzG6GXKlsEyQOMb+?= =?us-ascii?Q?x/yQbLs+CHNQQf1iNyMsIkmqsYYbSzKOCcmqQHV7zNccBuMOnxaAf1oh9BSG?= =?us-ascii?Q?Eg3H/vbYx4e3wAWr/aTxYHyb+JUPJa1zfFOX82Kgo2L2Q52hBqaJ93bdrljS?= =?us-ascii?Q?pkr+Nt2CUdDxAJ//jPQ9m78NUAEN0uzJkO6UO/ZP2WLYMQNez7Zxw3Thj6jX?= =?us-ascii?Q?VYF2x3l53AwovHQJ6Je9ItxrKACcICn80rT+gayqvP6U3iy9SNliMPsokXVA?= =?us-ascii?Q?EftgdntqkiQ5YFSp7cb5Lhx2wZzZU0KE4aAdauHnYgZBv+ySQoOXrnyXeUPM?= =?us-ascii?Q?cKntUfQSeUuSPi/dV7c2xh3zsF9DOrPiCbO1atqQS23moza/Ix9q3zuDy5Zd?= =?us-ascii?Q?CA=3D=3D?= X-OriginatorOrg: jaguarmicro.com X-MS-Exchange-CrossTenant-Network-Message-Id: a2101fb2-1589-47a6-d4f8-08dabe4a2db8 X-MS-Exchange-CrossTenant-AuthSource: TY0PR06MB5683.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Nov 2022 09:51:43.2635 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 1e45a5c2-d3e1-46b3-a0e6-c5ebf6d8ba7b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: A0nviKQnYN4nrBVryFcgb6galuLfCjsoG9ur7HBqhJAehLZQeHrKYJTLLqSM6jYPSYOYjFxxurGasNoIyL4eLQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PUZPR06MB6032 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 The memory of h->hash_rcu_cfg which is allocated in rte_hash_rcu_qsbr_add was leaked. Fixes: 769b2de ("hash: implement RCU resources reclamation") Cc: stable@dpdk.org Signed-off-by: Jun Qiu --- lib/hash/rte_cuckoo_hash.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/hash/rte_cuckoo_hash.c b/lib/hash/rte_cuckoo_hash.c index 62c762439a..829b79c89a 100644 --- a/lib/hash/rte_cuckoo_hash.c +++ b/lib/hash/rte_cuckoo_hash.c @@ -521,6 +521,7 @@ rte_hash_free(struct rte_hash *h) rte_free(h->buckets_ext); rte_free(h->tbl_chng_cnt); rte_free(h->ext_bkt_to_free); + rte_free(h->hash_rcu_cfg); rte_free(h); rte_free(te); } -- 2.25.1