Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/92128/?format=api
http://patches.dpdk.org/api/patches/92128/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/1619355269-14802-1-git-send-email-humin29@huawei.com/", "project": { "id": 1, "url": "http://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": "<1619355269-14802-1-git-send-email-humin29@huawei.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1619355269-14802-1-git-send-email-humin29@huawei.com", "date": "2021-04-25T12:54:29", "name": "net/txgbe: fix null pointer check problem", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "a6ff7a389dc0d8e76f3bea87bec80ae96e21390c", "submitter": { "id": 1944, "url": "http://patches.dpdk.org/api/people/1944/?format=api", "name": "humin (Q)", "email": "humin29@huawei.com" }, "delegate": { "id": 319, "url": "http://patches.dpdk.org/api/users/319/?format=api", "username": "fyigit", "first_name": "Ferruh", "last_name": "Yigit", "email": "ferruh.yigit@amd.com" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/1619355269-14802-1-git-send-email-humin29@huawei.com/mbox/", "series": [ { "id": 16655, "url": "http://patches.dpdk.org/api/series/16655/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=16655", "date": "2021-04-25T12:54:29", "name": "net/txgbe: fix null pointer check problem", "version": 1, "mbox": "http://patches.dpdk.org/series/16655/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/92128/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/92128/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 E78C1A0548;\n\tSun, 25 Apr 2021 14:54:25 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id AAA8D41139;\n\tSun, 25 Apr 2021 14:54:25 +0200 (CEST)", "from szxga05-in.huawei.com (szxga05-in.huawei.com [45.249.212.191])\n by mails.dpdk.org (Postfix) with ESMTP id BAD7D4110A\n for <dev@dpdk.org>; Sun, 25 Apr 2021 14:54:24 +0200 (CEST)", "from DGGEMS410-HUB.china.huawei.com (unknown [172.30.72.60])\n by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4FSnvn1Dm3zNxsY;\n Sun, 25 Apr 2021 20:51:17 +0800 (CST)", "from localhost.localdomain (10.69.192.56) by\n DGGEMS410-HUB.china.huawei.com (10.3.19.210) with Microsoft SMTP Server id\n 14.3.498.0; Sun, 25 Apr 2021 20:54:18 +0800" ], "From": "\"Min Hu (Connor)\" <humin29@huawei.com>", "To": "<dev@dpdk.org>", "CC": "<ferruh.yigit@intel.com>, <jiawenwu@trustnetic.com>,\n <jianwang@trustnetic.com>", "Date": "Sun, 25 Apr 2021 20:54:29 +0800", "Message-ID": "<1619355269-14802-1-git-send-email-humin29@huawei.com>", "X-Mailer": "git-send-email 2.7.4", "MIME-Version": "1.0", "Content-Type": "text/plain", "X-Originating-IP": "[10.69.192.56]", "X-CFilter-Loop": "Reflected", "Subject": "[dpdk-dev] [PATCH] net/txgbe: fix null pointer check problem", "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", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "From: HongBo Zheng <zhenghongbo3@huawei.com>\n\nIn function cons_parse_ntuple_filter, item->spec and item->mask\nshould be confirmed not null before use memcmp on it, current\njudgement (item->spec || item->mask) just can confirm item->spec\nor item->mask is not null, and cause null pointer be used in\nmemcmp.\n\nThis patch fix this problem.\n\nFixes: b7eeecb17556 (\"net/txgbe: parse n-tuple filter\")\nCc: stable@dpdk.org\n\nSigned-off-by: HongBo Zheng <zhenghongbo3@huawei.com>\nSigned-off-by: Min Hu (Connor) <humin29@huawei.com>\n---\n drivers/net/txgbe/txgbe_flow.c | 18 ++++++++----------\n 1 file changed, 8 insertions(+), 10 deletions(-)", "diff": "diff --git a/drivers/net/txgbe/txgbe_flow.c b/drivers/net/txgbe/txgbe_flow.c\nindex 57a4f2e..35026ee 100644\n--- a/drivers/net/txgbe/txgbe_flow.c\n+++ b/drivers/net/txgbe/txgbe_flow.c\n@@ -240,11 +240,10 @@ cons_parse_ntuple_filter(const struct rte_flow_attr *attr,\n \t\t\treturn -rte_errno;\n \t\t}\n \t\t/* if the first item is MAC, the content should be NULL */\n-\t\tif ((item->spec || item->mask) &&\n-\t\t\t(memcmp(eth_spec, ð_null,\n-\t\t\t\tsizeof(struct rte_flow_item_eth)) ||\n-\t\t\t memcmp(eth_mask, ð_null,\n-\t\t\t\tsizeof(struct rte_flow_item_eth)))) {\n+\t\tif ((item->spec && memcmp(eth_spec, ð_null,\n+\t\t\t\t\t sizeof(struct rte_flow_item_eth))) ||\n+\t\t (item->mask && memcmp(eth_mask, ð_null,\n+\t\t\t\t\t sizeof(struct rte_flow_item_eth)))) {\n \t\t\trte_flow_error_set(error, EINVAL,\n \t\t\t\tRTE_FLOW_ERROR_TYPE_ITEM,\n \t\t\t\titem, \"Not supported by ntuple filter\");\n@@ -272,11 +271,10 @@ cons_parse_ntuple_filter(const struct rte_flow_attr *attr,\n \t\t\treturn -rte_errno;\n \t\t}\n \t\t/* the content should be NULL */\n-\t\tif ((item->spec || item->mask) &&\n-\t\t\t(memcmp(vlan_spec, &vlan_null,\n-\t\t\t\tsizeof(struct rte_flow_item_vlan)) ||\n-\t\t\t memcmp(vlan_mask, &vlan_null,\n-\t\t\t\tsizeof(struct rte_flow_item_vlan)))) {\n+\t\tif ((item->spec && memcmp(vlan_spec, &vlan_null,\n+\t\t\t\t\t sizeof(struct rte_flow_item_vlan))) ||\n+\t\t (item->mask && memcmp(vlan_mask, &vlan_null,\n+\t\t\t\t\t sizeof(struct rte_flow_item_vlan)))) {\n \t\t\trte_flow_error_set(error, EINVAL,\n \t\t\t\tRTE_FLOW_ERROR_TYPE_ITEM,\n \t\t\t\titem, \"Not supported by ntuple filter\");\n", "prefixes": [] }{ "id": 92128, "url": "