Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/134331/?format=api
http://patches.dpdk.org/api/patches/134331/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20231114123552.398072-11-huangdengdui@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": "<20231114123552.398072-11-huangdengdui@huawei.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20231114123552.398072-11-huangdengdui@huawei.com", "date": "2023-11-14T12:35:20", "name": "[v3,10/42] bus/cdx: use rte strerror", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": true, "hash": "7c01c9472c6f9c769aefb59e7cc864bdcb1a79f2", "submitter": { "id": 3066, "url": "http://patches.dpdk.org/api/people/3066/?format=api", "name": "huangdengdui", "email": "huangdengdui@huawei.com" }, "delegate": { "id": 24651, "url": "http://patches.dpdk.org/api/users/24651/?format=api", "username": "dmarchand", "first_name": "David", "last_name": "Marchand", "email": "david.marchand@redhat.com" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20231114123552.398072-11-huangdengdui@huawei.com/mbox/", "series": [ { "id": 30293, "url": "http://patches.dpdk.org/api/series/30293/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=30293", "date": "2023-11-14T12:35:13", "name": "replace strerror", "version": 3, "mbox": "http://patches.dpdk.org/series/30293/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/134331/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/134331/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 9995443329;\n\tTue, 14 Nov 2023 13:36:46 +0100 (CET)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 200944069F;\n\tTue, 14 Nov 2023 13:36:07 +0100 (CET)", "from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255])\n by mails.dpdk.org (Postfix) with ESMTP id 4210140294\n for <dev@dpdk.org>; Tue, 14 Nov 2023 13:35:56 +0100 (CET)", "from dggpeml500011.china.huawei.com (unknown [172.30.72.53])\n by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4SV5Kc1rhmz1P88S;\n Tue, 14 Nov 2023 20:32:36 +0800 (CST)", "from localhost.huawei.com (10.50.165.33) by\n dggpeml500011.china.huawei.com (7.185.36.84) with Microsoft SMTP Server\n (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id\n 15.1.2507.31; Tue, 14 Nov 2023 20:35:54 +0800" ], "From": "Dengdui Huang <huangdengdui@huawei.com>", "To": "<dev@dpdk.org>", "CC": "<ferruh.yigit@amd.com>, <stephen@networkplumber.org>,\n <lihuisong@huawei.com>, <fengchengwen@huawei.com>, <liuyonglong@huawei.com>", "Subject": "[PATCH v3 10/42] bus/cdx: use rte strerror", "Date": "Tue, 14 Nov 2023 20:35:20 +0800", "Message-ID": "<20231114123552.398072-11-huangdengdui@huawei.com>", "X-Mailer": "git-send-email 2.33.0", "In-Reply-To": "<20231114123552.398072-1-huangdengdui@huawei.com>", "References": "<20231114082539.1858594-44-huangdengdui@huawei.com>\n <20231114123552.398072-1-huangdengdui@huawei.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Content-Type": "text/plain", "X-Originating-IP": "[10.50.165.33]", "X-ClientProxiedBy": "dggems706-chm.china.huawei.com (10.3.19.183) To\n dggpeml500011.china.huawei.com (7.185.36.84)", "X-CFilter-Loop": "Reflected", "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": "The function strerror() is insecure in a multi-thread environment.\nThis patch uses rte_strerror() to replace it.\n\nCc: stable@dpdk.org\n\nSigned-off-by: Dengdui Huang <huangdengdui@huawei.com>\nAcked-by: Chengwen Feng <fengchengwen@huawei.com>\n---\n drivers/bus/cdx/cdx.c | 2 +-\n drivers/bus/cdx/cdx_vfio.c | 13 +++++++------\n 2 files changed, 8 insertions(+), 7 deletions(-)", "diff": "diff --git a/drivers/bus/cdx/cdx.c b/drivers/bus/cdx/cdx.c\nindex 541aae76c3..a3161f8ee4 100644\n--- a/drivers/bus/cdx/cdx.c\n+++ b/drivers/bus/cdx/cdx.c\n@@ -271,7 +271,7 @@ cdx_scan(void)\n \tdir = opendir(RTE_CDX_BUS_DEVICES_PATH);\n \tif (dir == NULL) {\n \t\tCDX_BUS_INFO(\"%s(): opendir failed: %s\", __func__,\n-\t\t\tstrerror(errno));\n+\t\t\trte_strerror(errno));\n \t\treturn 0;\n \t}\n \ndiff --git a/drivers/bus/cdx/cdx_vfio.c b/drivers/bus/cdx/cdx_vfio.c\nindex 8a3ac0b995..6fb38abfac 100644\n--- a/drivers/bus/cdx/cdx_vfio.c\n+++ b/drivers/bus/cdx/cdx_vfio.c\n@@ -20,6 +20,7 @@\n #include <rte_eal_paging.h>\n #include <rte_malloc.h>\n #include <rte_vfio.h>\n+#include <rte_errno.h>\n \n #include \"bus_cdx_driver.h\"\n #include \"cdx_logs.h\"\n@@ -198,7 +199,7 @@ cdx_vfio_setup_interrupts(struct rte_cdx_device *dev, int vfio_dev_fd,\n \t\tret = ioctl(vfio_dev_fd, VFIO_DEVICE_GET_IRQ_INFO, &irq);\n \t\tif (ret < 0) {\n \t\t\tCDX_BUS_ERR(\"Cannot get VFIO IRQ info, error %i (%s)\",\n-\t\t\t\terrno, strerror(errno));\n+\t\t\t\terrno, rte_strerror(errno));\n \t\t\treturn -1;\n \t\t}\n \n@@ -216,7 +217,7 @@ cdx_vfio_setup_interrupts(struct rte_cdx_device *dev, int vfio_dev_fd,\n \t\tfd = eventfd(0, EFD_NONBLOCK | EFD_CLOEXEC);\n \t\tif (fd < 0) {\n \t\t\tCDX_BUS_ERR(\"Cannot set up eventfd, error %i (%s)\",\n-\t\t\t\terrno, strerror(errno));\n+\t\t\t\terrno, rte_strerror(errno));\n \t\t\treturn -1;\n \t\t}\n \n@@ -252,7 +253,7 @@ cdx_vfio_setup_device(struct rte_cdx_device *dev, int vfio_dev_fd,\n \t */\n \tif (ioctl(vfio_dev_fd, VFIO_DEVICE_RESET) && errno != EINVAL) {\n \t\tCDX_BUS_ERR(\"Unable to reset device! Error: %d (%s)\", errno,\n-\t\t\tstrerror(errno));\n+\t\t\trte_strerror(errno));\n \t\treturn -1;\n \t}\n \n@@ -410,7 +411,7 @@ cdx_vfio_map_resource_primary(struct rte_cdx_device *dev)\n \t\tret = cdx_vfio_get_region_info(vfio_dev_fd, ®, i);\n \t\tif (ret < 0) {\n \t\t\tCDX_BUS_ERR(\"%s cannot get device region info error %i (%s)\",\n-\t\t\t\tdev_name, errno, strerror(errno));\n+\t\t\t\tdev_name, errno, rte_strerror(errno));\n \t\t\tgoto err_vfio_res;\n \t\t}\n \n@@ -438,7 +439,7 @@ cdx_vfio_map_resource_primary(struct rte_cdx_device *dev)\n \t\tret = cdx_vfio_mmap_resource(vfio_dev_fd, vfio_res, i, 0);\n \t\tif (ret < 0) {\n \t\t\tCDX_BUS_ERR(\"%s mapping region %i failed: %s\",\n-\t\t\t\tcdx_addr, i, strerror(errno));\n+\t\t\t\tcdx_addr, i, rte_strerror(errno));\n \t\t\tfree(reg);\n \t\t\tgoto err_vfio_res;\n \t\t}\n@@ -506,7 +507,7 @@ cdx_vfio_map_resource_secondary(struct rte_cdx_device *dev)\n \t\tret = cdx_vfio_mmap_resource(vfio_dev_fd, vfio_res, i, MAP_FIXED);\n \t\tif (ret < 0) {\n \t\t\tCDX_BUS_ERR(\"%s mapping MMIO region %i failed: %s\",\n-\t\t\t\tdev_name, i, strerror(errno));\n+\t\t\t\tdev_name, i, rte_strerror(errno));\n \t\t\tgoto err_vfio_dev_fd;\n \t\t}\n \n", "prefixes": [ "v3", "10/42" ] }{ "id": 134331, "url": "