Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/90444/?format=api
http://patches.dpdk.org/api/patches/90444/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/1617332330-25936-3-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": "<1617332330-25936-3-git-send-email-humin29@huawei.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1617332330-25936-3-git-send-email-humin29@huawei.com", "date": "2021-04-02T02:58:49", "name": "[v2,2/3] ethdev: fix miss input validation when access reg info", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "d0302301d215d930f703c8a1a84d97da6b6d755e", "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/1617332330-25936-3-git-send-email-humin29@huawei.com/mbox/", "series": [ { "id": 16071, "url": "http://patches.dpdk.org/api/series/16071/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=16071", "date": "2021-04-02T02:58:50", "name": "fix miss input validation", "version": 2, "mbox": "http://patches.dpdk.org/series/16071/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/90444/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/90444/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 278CCA0548;\n\tFri, 2 Apr 2021 04:58:37 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 1896414106D;\n\tFri, 2 Apr 2021 04:58:32 +0200 (CEST)", "from szxga04-in.huawei.com (szxga04-in.huawei.com [45.249.212.190])\n by mails.dpdk.org (Postfix) with ESMTP id DA5A214105D\n for <dev@dpdk.org>; Fri, 2 Apr 2021 04:58:29 +0200 (CEST)", "from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.60])\n by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4FBPnx1fH5z1BFlR\n for <dev@dpdk.org>; Fri, 2 Apr 2021 10:56:21 +0800 (CST)", "from localhost.localdomain (10.69.192.56) by\n DGGEMS413-HUB.china.huawei.com (10.3.19.213) with Microsoft SMTP Server id\n 14.3.498.0; Fri, 2 Apr 2021 10:58:24 +0800" ], "From": "\"Min Hu (Connor)\" <humin29@huawei.com>", "To": "<dev@dpdk.org>", "CC": "<ferruh.yigit@intel.com>", "Date": "Fri, 2 Apr 2021 10:58:49 +0800", "Message-ID": "<1617332330-25936-3-git-send-email-humin29@huawei.com>", "X-Mailer": "git-send-email 2.7.4", "In-Reply-To": "<1617332330-25936-1-git-send-email-humin29@huawei.com>", "References": "<1616830688-65506-1-git-send-email-humin29@huawei.com>\n <1617332330-25936-1-git-send-email-humin29@huawei.com>", "MIME-Version": "1.0", "Content-Type": "text/plain", "X-Originating-IP": "[10.69.192.56]", "X-CFilter-Loop": "Reflected", "Subject": "[dpdk-dev] [PATCH v2 2/3] ethdev: fix miss input validation when\n access reg info", "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: Chengchang Tang <tangchengchang@huawei.com>\n\nThis patch adds validity check of input pointer in regs dump API.\n\nFixes: 7a3f27cbf59b (\"ethdev: add access to specific device info\")\nFixes: 936eda25e8da (\"net/hns3: support dump register\")\nCc: stable@dpdk.org\n\nSigned-off-by: Chengchang Tang <tangchengchang@huawei.com>\nSigned-off-by: Min Hu (Connor) <humin29@huawei.com>\n---\n drivers/net/hns3/hns3_regs.c | 5 -----\n lib/librte_ethdev/rte_ethdev.c | 2 ++\n lib/librte_ethdev/rte_ethdev.h | 1 +\n 3 files changed, 3 insertions(+), 5 deletions(-)", "diff": "diff --git a/drivers/net/hns3/hns3_regs.c b/drivers/net/hns3/hns3_regs.c\nindex 4022bb9..f23e5c2 100644\n--- a/drivers/net/hns3/hns3_regs.c\n+++ b/drivers/net/hns3/hns3_regs.c\n@@ -484,11 +484,6 @@ hns3_get_regs(struct rte_eth_dev *eth_dev, struct rte_dev_reg_info *regs)\n \tuint32_t *data;\n \tint ret;\n \n-\tif (regs == NULL) {\n-\t\thns3_err(hw, \"the input parameter regs is NULL!\");\n-\t\treturn -EINVAL;\n-\t}\n-\n \tret = hns3_get_regs_length(hw, &length);\n \tif (ret)\n \t\treturn ret;\ndiff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c\nindex bb195ab..3fe200d 100644\n--- a/lib/librte_ethdev/rte_ethdev.c\n+++ b/lib/librte_ethdev/rte_ethdev.c\n@@ -5286,6 +5286,8 @@ rte_eth_dev_get_reg_info(uint16_t port_id, struct rte_dev_reg_info *info)\n \tstruct rte_eth_dev *dev;\n \n \tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\tif (info == NULL)\n+\t\treturn -EINVAL;\n \n \tdev = &rte_eth_devices[port_id];\n \tRTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->get_reg, -ENOTSUP);\ndiff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h\nindex 7cdb3fa..554d11f 100644\n--- a/lib/librte_ethdev/rte_ethdev.h\n+++ b/lib/librte_ethdev/rte_ethdev.h\n@@ -4397,6 +4397,7 @@ int rte_eth_get_monitor_addr(uint16_t port_id, uint16_t queue_id,\n * @return\n * - (0) if successful.\n * - (-ENOTSUP) if hardware doesn't support.\n+ * - (-EINVAL) if bad parameter.\n * - (-ENODEV) if *port_id* invalid.\n * - (-EIO) if device is removed.\n * - others depends on the specific operations implementation.\n", "prefixes": [ "v2", "2/3" ] }{ "id": 90444, "url": "