get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 129424,
    "url": "https://patches.dpdk.org/api/patches/129424/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20230710170800.12478-4-stephen@networkplumber.org/",
    "project": {
        "id": 1,
        "url": "https://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": "<20230710170800.12478-4-stephen@networkplumber.org>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230710170800.12478-4-stephen@networkplumber.org",
    "date": "2023-07-10T17:07:58",
    "name": "[v4,3/5] memzone: check result of rte_fbarray_get and malloc_elem_from_data",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "465a07765aa25b8738bc6abb7796746832921c02",
    "submitter": {
        "id": 27,
        "url": "https://patches.dpdk.org/api/people/27/?format=api",
        "name": "Stephen Hemminger",
        "email": "stephen@networkplumber.org"
    },
    "delegate": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20230710170800.12478-4-stephen@networkplumber.org/mbox/",
    "series": [
        {
            "id": 28886,
            "url": "https://patches.dpdk.org/api/series/28886/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=28886",
            "date": "2023-07-10T17:07:55",
            "name": "fixes for problems found by codeql analyzer",
            "version": 4,
            "mbox": "https://patches.dpdk.org/series/28886/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/129424/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/129424/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 F06E242E3C;\n\tMon, 10 Jul 2023 19:08:21 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 8620142B8E;\n\tMon, 10 Jul 2023 19:08:09 +0200 (CEST)",
            "from mail-pf1-f175.google.com (mail-pf1-f175.google.com\n [209.85.210.175])\n by mails.dpdk.org (Postfix) with ESMTP id E088941611\n for <dev@dpdk.org>; Mon, 10 Jul 2023 19:08:06 +0200 (CEST)",
            "by mail-pf1-f175.google.com with SMTP id\n d2e1a72fcca58-666e6541c98so4176796b3a.2\n for <dev@dpdk.org>; Mon, 10 Jul 2023 10:08:06 -0700 (PDT)",
            "from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218])\n by smtp.gmail.com with ESMTPSA id\n q17-20020a62e111000000b00682ed27f99dsm51799pfh.46.2023.07.10.10.08.05\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Mon, 10 Jul 2023 10:08:05 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1689008886;\n x=1691600886;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=HadCKv8ON/rlBz7y5pzzsqsNZoiFEyBsmZEp/1o1ERk=;\n b=DfxirwkoSjFq1kGP8vWv5a9oThzbFnQq5xG5bExyzTJcN6UClkS00JVvPd44ErZZPp\n TEFCKiEh1RGp4SmGtBRkvrUB/1Tu/i07jbatGOz/GO6XP73dPvIvyDHQn1wxYv2LNDCy\n x4QrU4MNI3pwLawo4ruA/vHluHZgASTLrD0QTpPgzTm9BQJ0e3077Fp4NWDKfi1QFdGS\n jdxAZFAQZXtTIYLcTzwhY1I28O+KW7xUx+FylAoLdRkigwUrXFfAotQHrMfTj22gmo5K\n PIe21DUtYM5LDk+TY6gpB9q7d3ouGzOBRNUvkvJZ4CBwV+ks1+Yh/mdbFiNNvDJsvJp5\n Sniw==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20221208; t=1689008886; x=1691600886;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n :subject:date:message-id:reply-to;\n bh=HadCKv8ON/rlBz7y5pzzsqsNZoiFEyBsmZEp/1o1ERk=;\n b=dhNrLuSAovMI5u8rmMECwAVRjzfTMihOkfzsKWMADAY+yhiRqm53OPsR8ReI0xE/UO\n PEHGRdisJtPAElVer2hh8qs5K/9rO+QIJcbBee5aCWVncEWTfbgQ5qrwYzXPObFYn03e\n lCIHpwRd1CG0eTZulD5qjbZmsYheNJigOEKWyJBq0INM6xddLOIe//NBLUjsxrcPHbrk\n 38401Pgnt3CPT3lra94twGQwmeGivAitaHA1oHWwqwCF6adiJgYc3pcY6Tyw50XbVtwg\n bnoNu4re+/hxnZ29qoQHdaQMhMlg1NwS4upmmWMJ3rDXQynvtqslliRPbyohKVN/HUOa\n gS0g==",
        "X-Gm-Message-State": "ABy/qLZjereKErE2rb6oaZ3Hfs4lD2I90YZmyAGHWUp+8PgQqH0foh20\n S3hirGuho9IOMHLE/EIsgdV8yf13sWT7W2FZZobbXQ==",
        "X-Google-Smtp-Source": "\n APBJJlHZGoLI0pYfbNv47U2EUuBMn6fNkOF09pmUczS/pjaYG5Dnbv+JQIXrQ1n9W8vGU+8BwGWc9Q==",
        "X-Received": "by 2002:a05:6a20:2585:b0:12e:5f07:7ede with SMTP id\n k5-20020a056a20258500b0012e5f077edemr16868438pzd.41.1689008885747;\n Mon, 10 Jul 2023 10:08:05 -0700 (PDT)",
        "From": "Stephen Hemminger <stephen@networkplumber.org>",
        "To": "dev@dpdk.org",
        "Cc": "Sinan Kaya <okaya@kernel.org>,\n Stephen Hemminger <stephen@networkplumber.org>,\n Anatoly Burakov <anatoly.burakov@intel.com>",
        "Subject": "[PATCH v4 3/5] memzone: check result of rte_fbarray_get and\n malloc_elem_from_data",
        "Date": "Mon, 10 Jul 2023 10:07:58 -0700",
        "Message-Id": "<20230710170800.12478-4-stephen@networkplumber.org>",
        "X-Mailer": "git-send-email 2.39.2",
        "In-Reply-To": "<20230710170800.12478-1-stephen@networkplumber.org>",
        "References": "<20230120044140.95975-1-okaya@kernel.org>\n <20230710170800.12478-1-stephen@networkplumber.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "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": "From: Sinan Kaya <okaya@kernel.org>\n\nIn memzone_lookup_thread_unsafe result of call to rte_fbarray_get\nis dereferenced here and may be null.\n\nIn memzone_reserve_aligned_thread_unsafe result of call\nto malloc_elem_from_data is dereferenced here and may be null.\n\nSigned-off-by: Sinan Kaya <okaya@kernel.org>\nSigned-off-by: Stephen Hemminger <stephen@networkplumber.org>\n---\n lib/eal/common/eal_common_memzone.c | 10 +++++++++-\n 1 file changed, 9 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/lib/eal/common/eal_common_memzone.c b/lib/eal/common/eal_common_memzone.c\nindex 1f3e7014995b..c96053b41e63 100644\n--- a/lib/eal/common/eal_common_memzone.c\n+++ b/lib/eal/common/eal_common_memzone.c\n@@ -77,7 +77,7 @@ memzone_lookup_thread_unsafe(const char *name)\n \ti = rte_fbarray_find_next_used(arr, 0);\n \twhile (i >= 0) {\n \t\tmz = rte_fbarray_get(arr, i);\n-\t\tif (mz->addr != NULL &&\n+\t\tif ((mz != NULL) && (mz->addr != NULL) &&\n \t\t\t\t!strncmp(name, mz->name, RTE_MEMZONE_NAMESIZE))\n \t\t\treturn mz;\n \t\ti = rte_fbarray_find_next_used(arr, i + 1);\n@@ -206,6 +206,10 @@ memzone_reserve_aligned_thread_unsafe(const char *name, size_t len,\n \t}\n \n \tstruct malloc_elem *elem = malloc_elem_from_data(mz_addr);\n+\tif (elem == NULL) {\n+\t\trte_errno = ENOSPC;\n+\t\treturn NULL;\n+\t}\n \n \t/* fill the zone in config */\n \tmz_idx = rte_fbarray_find_next_free(arr, 0);\n@@ -395,6 +399,10 @@ dump_memzone(const struct rte_memzone *mz, void *arg)\n \tfprintf(f, \"physical segments used:\\n\");\n \tms_idx = RTE_PTR_DIFF(mz->addr, msl->base_va) / page_sz;\n \tms = rte_fbarray_get(&msl->memseg_arr, ms_idx);\n+\tif (ms == NULL) {\n+\t\tRTE_LOG(DEBUG, EAL, \"Skipping bad memzone\\n\");\n+\t\treturn;\n+\t}\n \n \tdo {\n \t\tfprintf(f, \"  addr: %p iova: 0x%\" PRIx64 \" \"\n",
    "prefixes": [
        "v4",
        "3/5"
    ]
}