get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/134272/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 134272,
    "url": "http://patches.dpdk.org/api/patches/134272/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20231114110006.91148-16-haijie1@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": "<20231114110006.91148-16-haijie1@huawei.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20231114110006.91148-16-haijie1@huawei.com",
    "date": "2023-11-14T10:59:59",
    "name": "[v3,15/22] bus/fslmc: replace strtok with reentrant version",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "13dfce6ca53fd2c194de7f5eb65b6606f9b8cfcf",
    "submitter": {
        "id": 2935,
        "url": "http://patches.dpdk.org/api/people/2935/?format=api",
        "name": "Jie Hai",
        "email": "haijie1@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/20231114110006.91148-16-haijie1@huawei.com/mbox/",
    "series": [
        {
            "id": 30291,
            "url": "http://patches.dpdk.org/api/series/30291/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=30291",
            "date": "2023-11-14T10:59:44",
            "name": "replace strtok with reentrant version",
            "version": 3,
            "mbox": "http://patches.dpdk.org/series/30291/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/134272/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/134272/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 81A2043329;\n\tTue, 14 Nov 2023 12:11:29 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 919FB40E13;\n\tTue, 14 Nov 2023 12:10:15 +0100 (CET)",
            "from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188])\n by mails.dpdk.org (Postfix) with ESMTP id DF251402F2\n for <dev@dpdk.org>; Tue, 14 Nov 2023 12:10:00 +0100 (CET)",
            "from kwepemd100004.china.huawei.com (unknown [172.30.72.55])\n by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4SV3PR4HCDzPnZx;\n Tue, 14 Nov 2023 19:05:47 +0800 (CST)",
            "from localhost.localdomain (10.67.165.2) by\n kwepemd100004.china.huawei.com (7.221.188.31) with Microsoft SMTP Server\n (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id\n 15.2.1258.23; Tue, 14 Nov 2023 19:09:59 +0800"
        ],
        "From": "Jie Hai <haijie1@huawei.com>",
        "To": "<dev@dpdk.org>, Hemant Agrawal <hemant.agrawal@nxp.com>, Sachin Saxena\n <sachin.saxena@nxp.com>, Nipun Gupta <nipun.gupta@amd.com>, Santosh Shukla\n <santosh.shukla@caviumnetworks.com>, Shreyansh Jain <shreyansh.jain@nxp.com>,\n Ferruh Yigit <ferruh.yigit@intel.com>",
        "CC": "<haijie1@huawei.com>, <lihuisong@huawei.com>, <fengchengwen@huawei.com>",
        "Subject": "[PATCH v3 15/22] bus/fslmc: replace strtok with reentrant version",
        "Date": "Tue, 14 Nov 2023 18:59:59 +0800",
        "Message-ID": "<20231114110006.91148-16-haijie1@huawei.com>",
        "X-Mailer": "git-send-email 2.30.0",
        "In-Reply-To": "<20231114110006.91148-1-haijie1@huawei.com>",
        "References": "<20231113104550.2138654-1-haijie1@huawei.com>\n <20231114110006.91148-1-haijie1@huawei.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Originating-IP": "[10.67.165.2]",
        "X-ClientProxiedBy": "dggems705-chm.china.huawei.com (10.3.19.182) To\n kwepemd100004.china.huawei.com (7.221.188.31)",
        "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": "Multiple threads calling the same function may cause condition\nrace issues, which often leads to abnormal behavior and can cause\nmore serious vulnerabilities such as abnormal termination, denial\nof service, and compromised data integrity.\n\nThe strtok() is non-reentrant, it is better to replace it with a\nreentrant version.\n\nFixes: 9ccb76b24c1d (\"bus/fslmc: enable portal interrupt handling\")\nFixes: 828d51d8fc3e (\"bus/fslmc: refactor scan and probe functions\")\nCc: stable@dpdk.org\n\nSigned-off-by: Jie Hai <haijie1@huawei.com>\nAcked-by: Chengwen Feng <fengchengwen@huawei.com>\n---\n drivers/bus/fslmc/fslmc_bus.c            | 5 +++--\n drivers/bus/fslmc/portal/dpaa2_hw_dpio.c | 4 ++--\n 2 files changed, 5 insertions(+), 4 deletions(-)",
    "diff": "diff --git a/drivers/bus/fslmc/fslmc_bus.c b/drivers/bus/fslmc/fslmc_bus.c\nindex 57bfb5111a97..7960ad3979ef 100644\n--- a/drivers/bus/fslmc/fslmc_bus.c\n+++ b/drivers/bus/fslmc/fslmc_bus.c\n@@ -131,6 +131,7 @@ scan_one_fslmc_device(char *dev_name)\n {\n \tchar *dup_dev_name, *t_ptr;\n \tstruct rte_dpaa2_device *dev = NULL;\n+\tchar *sp = NULL;\n \tint ret = -1;\n \n \tif (!dev_name)\n@@ -168,7 +169,7 @@ scan_one_fslmc_device(char *dev_name)\n \t}\n \n \t/* Parse the device name and ID */\n-\tt_ptr = strtok(dup_dev_name, \".\");\n+\tt_ptr = strtok_r(dup_dev_name, \".\", &sp);\n \tif (!t_ptr) {\n \t\tDPAA2_BUS_ERR(\"Invalid device found: (%s)\", dup_dev_name);\n \t\tret = -EINVAL;\n@@ -199,7 +200,7 @@ scan_one_fslmc_device(char *dev_name)\n \telse\n \t\tdev->dev_type = DPAA2_UNKNOWN;\n \n-\tt_ptr = strtok(NULL, \".\");\n+\tt_ptr = strtok_r(NULL, \".\", &sp);\n \tif (!t_ptr) {\n \t\tDPAA2_BUS_ERR(\"Skipping invalid device (%s)\", dup_dev_name);\n \t\tret = 0;\ndiff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c\nindex 4aec7b2cd8ba..09a1a2b23787 100644\n--- a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c\n+++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c\n@@ -129,7 +129,7 @@ dpaa2_affine_dpio_intr_to_respective_core(int32_t dpio_id, int cpu_id)\n \tuint32_t cpu_mask = 1;\n \tint ret;\n \tsize_t len = 0;\n-\tchar *temp = NULL, *token = NULL;\n+\tchar *temp = NULL, *token = NULL, *sp = NULL;\n \tchar string[STRING_LEN], command[COMMAND_LEN];\n \tFILE *file;\n \n@@ -141,7 +141,7 @@ dpaa2_affine_dpio_intr_to_respective_core(int32_t dpio_id, int cpu_id)\n \t}\n \twhile (getline(&temp, &len, file) != -1) {\n \t\tif ((strstr(temp, string)) != NULL) {\n-\t\t\ttoken = strtok(temp, \":\");\n+\t\t\ttoken = strtok_r(temp, \":\", &sp);\n \t\t\tbreak;\n \t\t}\n \t}\n",
    "prefixes": [
        "v3",
        "15/22"
    ]
}