From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id E14FAA0096 for ; Tue, 4 Jun 2019 20:55:13 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D6AD11B9A9; Tue, 4 Jun 2019 20:55:12 +0200 (CEST) Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-eopbgr780042.outbound.protection.outlook.com [40.107.78.42]) by dpdk.org (Postfix) with ESMTP id 50BD21B974; Tue, 4 Jun 2019 20:55:09 +0200 (CEST) Received: from DM6PR07CA0043.namprd07.prod.outlook.com (2603:10b6:5:74::20) by SN6PR07MB4670.namprd07.prod.outlook.com (2603:10b6:805:3a::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1943.22; Tue, 4 Jun 2019 18:55:08 +0000 Received: from BY2NAM05FT030.eop-nam05.prod.protection.outlook.com (2a01:111:f400:7e52::209) by DM6PR07CA0043.outlook.office365.com (2603:10b6:5:74::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1943.16 via Frontend Transport; Tue, 4 Jun 2019 18:55:07 +0000 Authentication-Results: spf=fail (sender IP is 199.233.58.38) smtp.mailfrom=marvell.com; dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=fail action=none header.from=marvell.com; Received-SPF: Fail (protection.outlook.com: domain of marvell.com does not designate 199.233.58.38 as permitted sender) receiver=protection.outlook.com; client-ip=199.233.58.38; helo=CAEXCH02.caveonetworks.com; Received: from CAEXCH02.caveonetworks.com (199.233.58.38) by BY2NAM05FT030.mail.protection.outlook.com (10.152.100.167) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA) id 15.20.1965.10 via Frontend Transport; Tue, 4 Jun 2019 18:55:07 +0000 Received: from dut1171.mv.qlogic.com (10.112.88.18) by CAEXCH02.caveonetworks.com (10.67.98.110) with Microsoft SMTP Server (TLS) id 14.2.347.0; Tue, 4 Jun 2019 11:53:54 -0700 Received: from dut1171.mv.qlogic.com (localhost [127.0.0.1]) by dut1171.mv.qlogic.com (8.14.7/8.14.7) with ESMTP id x54Is15w028674; Tue, 4 Jun 2019 11:54:01 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id x54Is16i028673; Tue, 4 Jun 2019 11:54:01 -0700 From: Shahed Shaikh To: CC: , , , Date: Tue, 4 Jun 2019 11:53:50 -0700 Message-ID: <20190604185352.28629-3-shshaikh@marvell.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20190604185352.28629-1-shshaikh@marvell.com> References: <20190604185352.28629-1-shshaikh@marvell.com> MIME-Version: 1.0 Content-Type: text/plain X-EOPAttributedMessage: 0 X-Matching-Connectors: 132041481077517317; (abac79dc-c90b-41ba-8033-08d666125e47); (abac79dc-c90b-41ba-8033-08d666125e47) X-Forefront-Antispam-Report: CIP:199.233.58.38; IPV:CAL; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(136003)(376002)(39850400004)(396003)(346002)(2980300002)(1110001)(339900001)(189003)(199004)(6666004)(356004)(85426001)(2906002)(76176011)(53936002)(51416003)(486006)(54906003)(1076003)(5660300002)(81156014)(70586007)(76130400001)(50226002)(16586007)(8676002)(70206006)(8936002)(81166006)(305945005)(80596001)(87636003)(2351001)(26826003)(316002)(69596002)(36906005)(105606002)(498600001)(476003)(450100002)(11346002)(126002)(2616005)(36756003)(6916009)(4326008)(50466002)(48376002)(68736007)(47776003)(446003)(42186006)(26005)(86362001)(336012); DIR:OUT; SFP:1101; SCL:1; SRVR:SN6PR07MB4670; H:CAEXCH02.caveonetworks.com; FPR:; SPF:Fail; LANG:en; PTR:InfoDomainNonexistent; MX:1; A:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9372351a-e44c-4795-9dd5-08d6e91e29b4 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(5600148)(711020)(4605104)(1401327)(2017052603328); SRVR:SN6PR07MB4670; X-MS-TrafficTypeDiagnostic: SN6PR07MB4670: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:538; X-Forefront-PRVS: 0058ABBBC7 X-Microsoft-Antispam-Message-Info: HTfs9tu2VpEeGEAnVoN950sNkyCF8wdZ8/zkxxfVjGgNzV+2XkMlgVaemyRGJoznP8PnJYv2fqlTBqyJG0bKOK2+2fThL0VQtPL8nrDrnPvZW/WDv5OZ6J+EbapYeON7MNMAYbE8gGS4NlFdhIvHun9qsaf6JAB+7jCS0XivktZWXUfvk4EmBEvpGiocv5DcdGW+t/KwD5ehBIK7XJmg5NcudpakIi5dL9vNEXMjI+6bwdhlUNEIvnydEvrUJ+Vd2aNzlBCWaFjyXrp/87WBRvouaOQVRf1axEZ3h9MPjVWGBlwhbs5r2TVxjKBES3EG0c1mphCdyYZQ1qccCJNwLdw80L46MiOBHM85fBChuma0JdOEaBeKw7958Mxt5VjVHkaaekU37oXm1JBj/nxL3C/xLGczF0Y/Ne++yEOOaMw= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2019 18:55:07.4975 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9372351a-e44c-4795-9dd5-08d6e91e29b4 X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[199.233.58.38]; Helo=[CAEXCH02.caveonetworks.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR07MB4670 Subject: [dpdk-stable] [PATCH 3/5] net/bnx2x: fix memory leak X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 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" bnx2x_free_hsi_mem() does not free DMA memory. Fix it here. Fixes: 540a211084a7 ("bnx2x: driver core") Cc: stable@dpdk.org Signed-off-by: Shahed Shaikh --- drivers/net/bnx2x/bnx2x.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/bnx2x/bnx2x.c b/drivers/net/bnx2x/bnx2x.c index e9f05a73a..d3b260830 100644 --- a/drivers/net/bnx2x/bnx2x.c +++ b/drivers/net/bnx2x/bnx2x.c @@ -9018,36 +9018,42 @@ void bnx2x_free_hsi_mem(struct bnx2x_softc *sc) /*******************/ memset(&fp->status_block, 0, sizeof(fp->status_block)); + bnx2x_dma_free(&fp->sb_dma); } /***************************/ /* FW DECOMPRESSION BUFFER */ /***************************/ + bnx2x_dma_free(&sc->gz_buf_dma); sc->gz_buf = NULL; /*******************/ /* SLOW PATH QUEUE */ /*******************/ + bnx2x_dma_free(&sc->spq_dma); sc->spq = NULL; /*************/ /* SLOW PATH */ /*************/ + bnx2x_dma_free(&sc->sp_dma); sc->sp = NULL; /***************/ /* EVENT QUEUE */ /***************/ + bnx2x_dma_free(&sc->eq_dma); sc->eq = NULL; /************************/ /* DEFAULT STATUS BLOCK */ /************************/ + bnx2x_dma_free(&sc->def_sb_dma); sc->def_sb = NULL; } -- 2.12.3