get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 68974,
    "url": "http://patchwork.dpdk.org/api/patches/68974/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20200421032957.19548-1-huwei013@chinasoftinc.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": "<20200421032957.19548-1-huwei013@chinasoftinc.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200421032957.19548-1-huwei013@chinasoftinc.com",
    "date": "2020-04-21T03:29:57",
    "name": "lib/rte_eal: fix heap-use-after-free bug",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "60aec94a74cd864f388e18576e3e1d545be09657",
    "submitter": {
        "id": 1537,
        "url": "http://patchwork.dpdk.org/api/people/1537/?format=api",
        "name": "Wei Hu (Xavier)",
        "email": "huwei013@chinasoftinc.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/20200421032957.19548-1-huwei013@chinasoftinc.com/mbox/",
    "series": [
        {
            "id": 9523,
            "url": "http://patchwork.dpdk.org/api/series/9523/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=9523",
            "date": "2020-04-21T03:29:57",
            "name": "lib/rte_eal: fix heap-use-after-free bug",
            "version": 1,
            "mbox": "http://patchwork.dpdk.org/series/9523/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/68974/comments/",
    "check": "fail",
    "checks": "http://patchwork.dpdk.org/api/patches/68974/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 dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id E5BB2A0561;\n\tTue, 21 Apr 2020 05:30:23 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id B51C11D5B9;\n\tTue, 21 Apr 2020 05:30:22 +0200 (CEST)",
            "from mail.chinasoftinc.com (unknown [114.113.233.8])\n by dpdk.org (Postfix) with ESMTP id 1B5CE1D5B8\n for <dev@dpdk.org>; Tue, 21 Apr 2020 05:30:19 +0200 (CEST)",
            "from localhost.localdomain (114.119.4.74) by INCCAS002.ito.icss\n (10.168.0.60) with Microsoft SMTP Server id 14.3.487.0; Tue, 21 Apr 2020\n 11:30:07 +0800"
        ],
        "From": "\"Wei Hu (Xavier)\" <huwei013@chinasoftinc.com>",
        "To": "<dev@dpdk.org>",
        "Date": "Tue, 21 Apr 2020 11:29:57 +0800",
        "Message-ID": "<20200421032957.19548-1-huwei013@chinasoftinc.com>",
        "X-Mailer": "git-send-email 2.23.0",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Originating-IP": "[114.119.4.74]",
        "Subject": "[dpdk-dev] [PATCH] lib/rte_eal: fix heap-use-after-free bug",
        "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 <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",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "From: \"Wei Hu (Xavier)\" <xavier.huwei@huawei.com>\n\nThis patch fixes the heap-use-after-free bug which was found by ASAN\n(Address-Sanitizer) in the vfio_get_default_container_fd function.\n\nFixes: 6bcb7c95fe14 (\"vfio: share default container in multi-process\")\nCc: stable@dpdk.org\n\nSigned-off-by: Chengwen Feng <fengchengwen@huawei.com>\nSigned-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>\n---\n lib/librte_eal/linux/eal_vfio.c | 4 +++-\n 1 file changed, 3 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/lib/librte_eal/linux/eal_vfio.c b/lib/librte_eal/linux/eal_vfio.c\nindex 4502aefed..1470b58c6 100644\n--- a/lib/librte_eal/linux/eal_vfio.c\n+++ b/lib/librte_eal/linux/eal_vfio.c\n@@ -1092,6 +1092,7 @@ vfio_get_default_container_fd(void)\n \tstruct rte_mp_reply mp_reply = {0};\n \tstruct timespec ts = {.tv_sec = 5, .tv_nsec = 0};\n \tstruct vfio_mp_param *p = (struct vfio_mp_param *)mp_req.param;\n+\tint container_fd;\n \n \tif (default_vfio_cfg->vfio_enabled)\n \t\treturn default_vfio_cfg->vfio_container_fd;\n@@ -1114,8 +1115,9 @@ vfio_get_default_container_fd(void)\n \t\tmp_rep = &mp_reply.msgs[0];\n \t\tp = (struct vfio_mp_param *)mp_rep->param;\n \t\tif (p->result == SOCKET_OK && mp_rep->num_fds == 1) {\n+\t\t\tcontainer_fd = mp_rep->fds[0];\n \t\t\tfree(mp_reply.msgs);\n-\t\t\treturn mp_rep->fds[0];\n+\t\t\treturn container_fd;\n \t\t}\n \t}\n \n",
    "prefixes": []
}