Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/134335/?format=api
http://patchwork.dpdk.org/api/patches/134335/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20231114123552.398072-17-huangdengdui@huawei.com/", "project": { "id": 1, "url": "http://patchwork.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-17-huangdengdui@huawei.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20231114123552.398072-17-huangdengdui@huawei.com", "date": "2023-11-14T12:35:26", "name": "[v3,16/42] common/cnxk: use rte strerror", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": true, "hash": "ffc0e10f52d5d8181f2e98f63f4a2db402be5a00", "submitter": { "id": 3066, "url": "http://patchwork.dpdk.org/api/people/3066/?format=api", "name": "huangdengdui", "email": "huangdengdui@huawei.com" }, "delegate": { "id": 24651, "url": "http://patchwork.dpdk.org/api/users/24651/?format=api", "username": "dmarchand", "first_name": "David", "last_name": "Marchand", "email": "david.marchand@redhat.com" }, "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20231114123552.398072-17-huangdengdui@huawei.com/mbox/", "series": [ { "id": 30293, "url": "http://patchwork.dpdk.org/api/series/30293/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=30293", "date": "2023-11-14T12:35:13", "name": "replace strerror", "version": 3, "mbox": "http://patchwork.dpdk.org/series/30293/mbox/" } ], "comments": "http://patchwork.dpdk.org/api/patches/134335/comments/", "check": "success", "checks": "http://patchwork.dpdk.org/api/patches/134335/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 DC5EF43329;\n\tTue, 14 Nov 2023 13:37:24 +0100 (CET)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id F065940A7D;\n\tTue, 14 Nov 2023 13:36:12 +0100 (CET)", "from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189])\n by mails.dpdk.org (Postfix) with ESMTP id E07C2402B2\n for <dev@dpdk.org>; Tue, 14 Nov 2023 13:35:56 +0100 (CET)", "from dggpeml500011.china.huawei.com (unknown [172.30.72.55])\n by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4SV5J84TqyzMmsj;\n Tue, 14 Nov 2023 20:31:20 +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:55 +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 16/42] common/cnxk: use rte strerror", "Date": "Tue, 14 Nov 2023 20:35:26 +0800", "Message-ID": "<20231114123552.398072-17-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/common/cnxk/roc_dev.c | 4 +++-\n drivers/common/cnxk/roc_model.c | 4 +++-\n drivers/common/cnxk/roc_utils.c | 4 +++-\n 3 files changed, 9 insertions(+), 3 deletions(-)", "diff": "diff --git a/drivers/common/cnxk/roc_dev.c b/drivers/common/cnxk/roc_dev.c\nindex e7e89bf3d6..812e6890f0 100644\n--- a/drivers/common/cnxk/roc_dev.c\n+++ b/drivers/common/cnxk/roc_dev.c\n@@ -8,6 +8,8 @@\n #include <sys/mman.h>\n #include <unistd.h>\n \n+#include <rte_errno.h>\n+\n #include \"roc_api.h\"\n #include \"roc_priv.h\"\n \n@@ -1313,7 +1315,7 @@ dev_lmt_setup(struct dev *dev)\n \tmz = plt_lmt_region_reserve_aligned(name, LMT_REGION_SIZE,\n \t\t\t\t\t LMT_REGION_SIZE);\n \tif (!mz) {\n-\t\tplt_err(\"Memory alloc failed: %s\", strerror(errno));\n+\t\tplt_err(\"Memory alloc failed: %s\", rte_strerror(errno));\n \t\tgoto fail;\n \t}\n \ndiff --git a/drivers/common/cnxk/roc_model.c b/drivers/common/cnxk/roc_model.c\nindex 6dc2afe7f0..647af4b7ab 100644\n--- a/drivers/common/cnxk/roc_model.c\n+++ b/drivers/common/cnxk/roc_model.c\n@@ -6,6 +6,8 @@\n #include <fcntl.h>\n #include <unistd.h>\n \n+#include <rte_errno.h>\n+\n #include \"roc_api.h\"\n #include \"roc_priv.h\"\n \n@@ -154,7 +156,7 @@ cn10k_part_pass_get(uint32_t *part, uint32_t *pass)\n \tdir = opendir(SYSFS_PCI_DEVICES);\n \tif (dir == NULL) {\n \t\tplt_err(\"%s(): opendir failed: %s\\n\", __func__,\n-\t\t\tstrerror(errno));\n+\t\t\trte_strerror(errno));\n \t\treturn -errno;\n \t}\n \ndiff --git a/drivers/common/cnxk/roc_utils.c b/drivers/common/cnxk/roc_utils.c\nindex 9af2ae9b69..418cd6b477 100644\n--- a/drivers/common/cnxk/roc_utils.c\n+++ b/drivers/common/cnxk/roc_utils.c\n@@ -2,6 +2,8 @@\n * Copyright(C) 2021 Marvell.\n */\n \n+#include <rte_errno.h>\n+\n #include \"roc_api.h\"\n #include \"roc_priv.h\"\n \n@@ -245,7 +247,7 @@ roc_error_msg_get(int errorcode)\n \t\t * Handle general error (as defined in linux errno.h)\n \t\t */\n \t\tif (abs(errorcode) < 300)\n-\t\t\terr_msg = strerror(abs(errorcode));\n+\t\t\terr_msg = rte_strerror(abs(errorcode));\n \t\telse\n \t\t\terr_msg = \"Unknown error code\";\n \t\tbreak;\n", "prefixes": [ "v3", "16/42" ] }{ "id": 134335, "url": "