Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/113662/?format=api
http://patchwork.dpdk.org/api/patches/113662/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20220704152751.943965-3-kevin.laatz@intel.com/", "project": { "id": 1, "url": "http://patchwork.dpdk.org/api/projects/1/?format=api", "name": "DPDK", "link_name": "dpdk", "list_id": "dev.dpdk.org", "list_email": "dev@dpdk.org", "web_url": "http://core.dpdk.org", "scm_url": "git://dpdk.org/dpdk", "webscm_url": "http://git.dpdk.org/dpdk", "list_archive_url": "https://inbox.dpdk.org/dev", "list_archive_url_format": "https://inbox.dpdk.org/dev/{}", "commit_url_format": "" }, "msgid": "<20220704152751.943965-3-kevin.laatz@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20220704152751.943965-3-kevin.laatz@intel.com", "date": "2022-07-04T15:27:50", "name": "[v3,2/3] dma/idxd: fix memory leak due to free on incorrect pointer", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "11c7e2850d234bf9b0f338b213c09617e0c87f91", "submitter": { "id": 921, "url": "http://patchwork.dpdk.org/api/people/921/?format=api", "name": "Kevin Laatz", "email": "kevin.laatz@intel.com" }, "delegate": { "id": 1, "url": "http://patchwork.dpdk.org/api/users/1/?format=api", "username": "tmonjalo", "first_name": "Thomas", "last_name": "Monjalon", "email": "thomas@monjalon.net" }, "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20220704152751.943965-3-kevin.laatz@intel.com/mbox/", "series": [ { "id": 23877, "url": "http://patchwork.dpdk.org/api/series/23877/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=23877", "date": "2022-07-04T15:27:48", "name": "Fix IDXD PCI device close", "version": 3, "mbox": "http://patchwork.dpdk.org/series/23877/mbox/" } ], "comments": "http://patchwork.dpdk.org/api/patches/113662/comments/", "check": "success", "checks": "http://patchwork.dpdk.org/api/patches/113662/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 38873A0540;\n\tMon, 4 Jul 2022 17:27:51 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 1E6A142B6F;\n\tMon, 4 Jul 2022 17:27:41 +0200 (CEST)", "from mga12.intel.com (mga12.intel.com [192.55.52.136])\n by mails.dpdk.org (Postfix) with ESMTP id F422A410E5;\n Mon, 4 Jul 2022 17:27:37 +0200 (CEST)", "from fmsmga003.fm.intel.com ([10.253.24.29])\n by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 04 Jul 2022 08:27:11 -0700", "from silpixa00401122.ir.intel.com ([10.237.213.29])\n by FMSMGA003.fm.intel.com with ESMTP; 04 Jul 2022 08:27:10 -0700" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1656948458; x=1688484458;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=vzNee63WJBwbDCVa81Njrjgevg5hmTVjSaZRO4wjgV8=;\n b=KiaOfasebiHDLNWz+TsN3hP9qzsuzZntfHcjzYmzOWtgXC77CkXoIlJv\n bujXo1p6cBg/hYsGCq6xUqGkBUct/OpSv4LcuB98l0cAu/hCl9iN4qp2h\n 0ZAumiXu3Wy8uuHM/cPOV52zyShAYxt80nEjC9YxG4fDBWk5w8m4XCThM\n lV080H+FW1nX/JsBvsZ9jwPtnO1YoTeVzL1eRn+DMMDo8+yQwOLD96zXh\n hYElaG1Neq5tfm4we+TFfo65lybohTMd7uPPEk1K9L2gbHu4r8es78B4S\n kbcngdrXLqPSK/68ia+lDaY0CrhwusVwpp0TSNCwzD9/yxtZ0eZSXr27D Q==;", "X-IronPort-AV": [ "E=McAfee;i=\"6400,9594,10398\"; a=\"262946839\"", "E=Sophos;i=\"5.92,243,1650956400\"; d=\"scan'208\";a=\"262946839\"", "E=Sophos;i=\"5.92,243,1650956400\"; d=\"scan'208\";a=\"682231011\"" ], "X-ExtLoop1": "1", "From": "Kevin Laatz <kevin.laatz@intel.com>", "To": "dev@dpdk.org", "Cc": "bruce.richardson@intel.com, Kevin Laatz <kevin.laatz@intel.com>,\n stable@dpdk.org", "Subject": "[PATCH v3 2/3] dma/idxd: fix memory leak due to free on incorrect\n pointer", "Date": "Mon, 4 Jul 2022 16:27:50 +0100", "Message-Id": "<20220704152751.943965-3-kevin.laatz@intel.com>", "X-Mailer": "git-send-email 2.31.1", "In-Reply-To": "<20220704152751.943965-1-kevin.laatz@intel.com>", "References": "<20220408141504.1319913-1-kevin.laatz@intel.com>\n <20220704152751.943965-1-kevin.laatz@intel.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org" }, "content": "During PCI device close, any allocated memory needs to be free'd.\nCurrently, one of the free's is being called on an incorrect idxd_dmadev\nstruct member, namely 'batch_idx_ring'.\n\nAt device creation, memory is allocated for both 'batch_comp_ring' and\n'batch_idx_ring' simultaeneously. Calling free only on 'batch_idx_ring'\nmeant the first half of this memory was not being free'd, leading to the\nmemleak.\n\nThis patch fixes this memleak by calling free on 'batch_comp_ring' which\nwill free the memory for both rings.\n\nFixes: 9449330a8458 (\"dma/idxd: create dmadev instances on PCI probe\")\nCc: stable@dpdk.org\nCc: bruce.richardson@intel.com\n\nSigned-off-by: Kevin Laatz <kevin.laatz@intel.com>\nAcked-by: Bruce Richardson <bruce.richardson@intel.com>\n---\n drivers/dma/idxd/idxd_pci.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)", "diff": "diff --git a/drivers/dma/idxd/idxd_pci.c b/drivers/dma/idxd/idxd_pci.c\nindex fb618d34b6..2c3b01cd2b 100644\n--- a/drivers/dma/idxd/idxd_pci.c\n+++ b/drivers/dma/idxd/idxd_pci.c\n@@ -130,7 +130,7 @@ idxd_pci_dev_close(struct rte_dma_dev *dev)\n \n \t/* free device memory */\n \tIDXD_PMD_DEBUG(\"Freeing device driver memory\");\n-\trte_free(idxd->batch_idx_ring);\n+\trte_free(idxd->batch_comp_ring);\n \trte_free(idxd->desc_ring);\n \n \t/* if this is the last WQ on the device, disable the device and free\n", "prefixes": [ "v3", "2/3" ] }{ "id": 113662, "url": "