Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/52868/?format=api
https://patches.dpdk.org/api/patches/52868/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20190417143822.21276-1-herakliusz.lipiec@intel.com/", "project": { "id": 1, "url": "https://patches.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": "<20190417143822.21276-1-herakliusz.lipiec@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20190417143822.21276-1-herakliusz.lipiec@intel.com", "date": "2019-04-17T14:38:22", "name": "[1/8] ipc: fix rte_mp_request_sync memleak", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "be7f135f847cb100efb59f64fb7973ff638d1d0c", "submitter": { "id": 742, "url": "https://patches.dpdk.org/api/people/742/?format=api", "name": "Herakliusz Lipiec", "email": "herakliusz.lipiec@intel.com" }, "delegate": { "id": 1, "url": "https://patches.dpdk.org/api/users/1/?format=api", "username": "tmonjalo", "first_name": "Thomas", "last_name": "Monjalon", "email": "thomas@monjalon.net" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/20190417143822.21276-1-herakliusz.lipiec@intel.com/mbox/", "series": [ { "id": 4352, "url": "https://patches.dpdk.org/api/series/4352/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=4352", "date": "2019-04-17T14:38:22", "name": "[1/8] ipc: fix rte_mp_request_sync memleak", "version": 1, "mbox": "https://patches.dpdk.org/series/4352/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/52868/comments/", "check": "success", "checks": "https://patches.dpdk.org/api/patches/52868/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@dpdk.org", "Delivered-To": "patchwork@dpdk.org", "Received": [ "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 2CA221B6B6;\n\tWed, 17 Apr 2019 16:37:41 +0200 (CEST)", "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n\tby dpdk.org (Postfix) with ESMTP id 203621B69B;\n\tWed, 17 Apr 2019 16:37:38 +0200 (CEST)", "from orsmga006.jf.intel.com ([10.7.209.51])\n\tby orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t17 Apr 2019 07:37:37 -0700", "from silpixa00399499.ir.intel.com (HELO\n\tsilpixa00399499.ger.corp.intel.com) ([10.237.222.133])\n\tby orsmga006.jf.intel.com with ESMTP; 17 Apr 2019 07:37:36 -0700" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.60,362,1549958400\"; d=\"scan'208\";a=\"136586665\"", "From": "Herakliusz Lipiec <herakliusz.lipiec@intel.com>", "To": "dev@dpdk.org", "Cc": "Herakliusz Lipiec <herakliusz.lipiec@intel.com>, jianfeng.tan@intel.com, \n\tjia.quo@intel.com, gi.z.zhang@intel.com, stable@dpdk.org", "Date": "Wed, 17 Apr 2019 15:38:22 +0100", "Message-Id": "<20190417143822.21276-1-herakliusz.lipiec@intel.com>", "X-Mailer": "git-send-email 2.17.2", "Subject": "[dpdk-dev] [PATCH 1/8] ipc: fix rte_mp_request_sync memleak", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "When sending multiple requests, rte_mp_request_sync\ncan succeed sending a few of those requests, but then\nfail on a later one and in the end return with rc=-1.\nThe upper layers - e.g. device hotplug - currently\nhandles this case as if no messages were sent and no\nmemory for response buffers was allocated, which is\nnot true. Fixed by always initializing message buffer\nto NULL.\n\nFixes: 783b6e54971d (\"eal: add synchronous multi-process communication\")\nCc: jianfeng.tan@intel.com\nCc: jia.quo@intel.com\nCc: gi.z.zhang@intel.com\nCc: stable@dpdk.org\n\nSigned-off-by: Herakliusz Lipiec <herakliusz.lipiec@intel.com>\n---\n lib/librte_eal/common/eal_common_proc.c | 6 +++---\n lib/librte_eal/common/include/rte_eal.h | 3 ++-\n 2 files changed, 5 insertions(+), 4 deletions(-)", "diff": "diff --git a/lib/librte_eal/common/eal_common_proc.c b/lib/librte_eal/common/eal_common_proc.c\nindex b46d644b3..abaff5164 100644\n--- a/lib/librte_eal/common/eal_common_proc.c\n+++ b/lib/librte_eal/common/eal_common_proc.c\n@@ -927,13 +927,13 @@ rte_mp_request_sync(struct rte_mp_msg *req, struct rte_mp_reply *reply,\n \n \tRTE_LOG(DEBUG, EAL, \"request: %s\\n\", req->name);\n \n-\tif (check_input(req) == false)\n-\t\treturn -1;\n-\n \treply->nb_sent = 0;\n \treply->nb_received = 0;\n \treply->msgs = NULL;\n \n+\tif (check_input(req) == false)\n+\t\treturn -1;\n+\n \tif (internal_config.no_shconf) {\n \t\tRTE_LOG(DEBUG, EAL, \"No shared files mode enabled, IPC is disabled\\n\");\n \t\treturn 0;\ndiff --git a/lib/librte_eal/common/include/rte_eal.h b/lib/librte_eal/common/include/rte_eal.h\nindex 833433229..575f8119e 100644\n--- a/lib/librte_eal/common/include/rte_eal.h\n+++ b/lib/librte_eal/common/include/rte_eal.h\n@@ -309,7 +309,8 @@ rte_mp_sendmsg(struct rte_mp_msg *msg);\n * This function sends a request message to the peer process, and will\n * block until receiving reply message from the peer process.\n *\n- * @note The caller is responsible to free reply->replies.\n+ * @note The caller is responsible to free reply->replies (even if the function\n+ * returned failure).\n *\n * @param req\n * The req argument contains the customized request message.\n", "prefixes": [ "1/8" ] }{ "id": 52868, "url": "