Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/11546/?format=api
https://patches.dpdk.org/api/patches/11546/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/1458137793-25826-2-git-send-email-christian.ehrhardt@canonical.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": "<1458137793-25826-2-git-send-email-christian.ehrhardt@canonical.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1458137793-25826-2-git-send-email-christian.ehrhardt@canonical.com", "date": "2016-03-16T14:16:29", "name": "[dpdk-dev,1/5] lpm6: fix use after free of lpm in rte_lpm6_create", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "f4b07658c4e8311c87c86d6fee035c93b46d45c0", "submitter": { "id": 382, "url": "https://patches.dpdk.org/api/people/382/?format=api", "name": "Christian Ehrhardt", "email": "christian.ehrhardt@canonical.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/1458137793-25826-2-git-send-email-christian.ehrhardt@canonical.com/mbox/", "series": [], "comments": "https://patches.dpdk.org/api/patches/11546/comments/", "check": "pending", "checks": "https://patches.dpdk.org/api/patches/11546/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 [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id 3FEB95598;\n\tWed, 16 Mar 2016 15:16:44 +0100 (CET)", "from youngberry.canonical.com (youngberry.canonical.com\n\t[91.189.89.112]) by dpdk.org (Postfix) with ESMTP id 5E4F45595\n\tfor <dev@dpdk.org>; Wed, 16 Mar 2016 15:16:43 +0100 (CET)", "from 1.general.mandel.uk.vpn ([10.172.196.172]\n\thelo=localhost.localdomain)\n\tby youngberry.canonical.com with esmtpsa\n\t(TLS1.0:RSA_AES_128_CBC_SHA1:16)\n\t(Exim 4.76) (envelope-from <christian.ehrhardt@canonical.com>)\n\tid 1agCFe-0007ks-RZ; Wed, 16 Mar 2016 14:16:42 +0000" ], "From": "Christian Ehrhardt <christian.ehrhardt@canonical.com>", "To": "christian.ehrhardt@canonical.com, bruce.richardson@intel.com,\n\tdev@dpdk.org, olivier.matz@6wind.com", "Date": "Wed, 16 Mar 2016 15:16:29 +0100", "Message-Id": "<1458137793-25826-2-git-send-email-christian.ehrhardt@canonical.com>", "X-Mailer": "git-send-email 2.7.0", "In-Reply-To": "<1458137793-25826-1-git-send-email-christian.ehrhardt@canonical.com>", "References": "<1458137793-25826-1-git-send-email-christian.ehrhardt@canonical.com>", "Subject": "[dpdk-dev] [PATCH 1/5] lpm6: fix use after free of lpm in\n\trte_lpm6_create", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "patches and discussions about DPDK <dev.dpdk.org>", "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://dpdk.org/ml/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "In certain autotests lpm->max_rules turned out to be non initialized.\nThat was caused by a failing allocation for lpm->rules_tbl in rte_lpm6_create.\nIt then left the function via goto exit with lpm freed, but still a pointer\nvalue being set.\n\nIn case of an allocation failure it resets lpm to NULL now, to avoid the\nupper layers operate on that already freed memory.\nAlong that is also makes the RTE_LOG message of the failed allocation unique.\n\nAcked-by: Stephen Hemminger <stephen@networkplumber.org>\nSigned-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>\n---\n lib/librte_lpm/rte_lpm6.c | 3 ++-\n 1 file changed, 2 insertions(+), 1 deletion(-)", "diff": "diff --git a/lib/librte_lpm/rte_lpm6.c b/lib/librte_lpm/rte_lpm6.c\nindex 6c2b293..48931cc 100644\n--- a/lib/librte_lpm/rte_lpm6.c\n+++ b/lib/librte_lpm/rte_lpm6.c\n@@ -206,8 +206,9 @@ rte_lpm6_create(const char *name, int socket_id,\n \t\t\t(size_t)rules_size, RTE_CACHE_LINE_SIZE, socket_id);\n \n \tif (lpm->rules_tbl == NULL) {\n-\t\tRTE_LOG(ERR, LPM, \"LPM memory allocation failed\\n\");\n+\t\tRTE_LOG(ERR, LPM, \"LPM rules_tbl allocation failed\\n\");\n \t\trte_free(lpm);\n+\t\tlpm = NULL;\n \t\trte_free(te);\n \t\tgoto exit;\n \t}\n", "prefixes": [ "dpdk-dev", "1/5" ] }{ "id": 11546, "url": "