get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 56461,
    "url": "https://patches.dpdk.org/api/patches/56461/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1563205172-352-2-git-send-email-erik.g.carrillo@intel.com/",
    "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": "<1563205172-352-2-git-send-email-erik.g.carrillo@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1563205172-352-2-git-send-email-erik.g.carrillo@intel.com",
    "date": "2019-07-15T15:39:31",
    "name": "[1/2] timer: fix null pointer dereference",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "7eac12f7a9a85cb8b611c2e74af25019a02afcf2",
    "submitter": {
        "id": 762,
        "url": "https://patches.dpdk.org/api/people/762/?format=api",
        "name": "Carrillo, Erik G",
        "email": "erik.g.carrillo@intel.com"
    },
    "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/1563205172-352-2-git-send-email-erik.g.carrillo@intel.com/mbox/",
    "series": [
        {
            "id": 5502,
            "url": "https://patches.dpdk.org/api/series/5502/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=5502",
            "date": "2019-07-15T15:39:30",
            "name": "fix segfault seen with performance-thread example",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/5502/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/56461/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/56461/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id DF6414CE4;\n\tMon, 15 Jul 2019 17:39:24 +0200 (CEST)",
            "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n\tby dpdk.org (Postfix) with ESMTP id 933702BA8;\n\tMon, 15 Jul 2019 17:39:21 +0200 (CEST)",
            "from orsmga008.jf.intel.com ([10.7.209.65])\n\tby orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t15 Jul 2019 08:39:20 -0700",
            "from wcpqa1.an.intel.com ([10.123.72.207])\n\tby orsmga008.jf.intel.com with ESMTP; 15 Jul 2019 08:39:19 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.63,493,1557212400\"; d=\"scan'208\";a=\"161116891\"",
        "From": "Erik Gabriel Carrillo <erik.g.carrillo@intel.com>",
        "To": "thomas@monjalon.net",
        "Cc": "dev@dpdk.org,\n\tstable@dpdk.org",
        "Date": "Mon, 15 Jul 2019 10:39:31 -0500",
        "Message-Id": "<1563205172-352-2-git-send-email-erik.g.carrillo@intel.com>",
        "X-Mailer": "git-send-email 1.7.10",
        "In-Reply-To": "<1563205172-352-1-git-send-email-erik.g.carrillo@intel.com>",
        "References": "<1563205172-352-1-git-send-email-erik.g.carrillo@intel.com>",
        "Subject": "[dpdk-dev] [PATCH 1/2] timer: fix null pointer dereference",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "If the timer subsystem is not initialized before rte_timer_manage (for\nexample) is invoked, a pointer to a shared hugepage memory region will\nstill be null and dereferenced when it is checked for validity; handle\nthis case.\n\nFixes: c0749f7096c7 (\"timer: allow management in shared memory\")\nCc: stable@dpdk.org\n\nSigned-off-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>\n---\n lib/librte_timer/rte_timer.c | 3 ++-\n 1 file changed, 2 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/lib/librte_timer/rte_timer.c b/lib/librte_timer/rte_timer.c\nindex 71dffd2..bdcf05d 100644\n--- a/lib/librte_timer/rte_timer.c\n+++ b/lib/librte_timer/rte_timer.c\n@@ -85,7 +85,8 @@ static struct rte_timer_data default_timer_data;\n static inline int\n timer_data_valid(uint32_t id)\n {\n-\treturn !!(rte_timer_data_arr[id].internal_flags & FL_ALLOCATED);\n+\treturn rte_timer_data_arr &&\n+\t\t(rte_timer_data_arr[id].internal_flags & FL_ALLOCATED);\n }\n \n /* validate ID and retrieve timer data pointer, or return error value */\n",
    "prefixes": [
        "1/2"
    ]
}