get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 124894,
    "url": "http://patchwork.dpdk.org/api/patches/124894/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20230309113631.300351-1-maxime.coquelin@redhat.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": "<20230309113631.300351-1-maxime.coquelin@redhat.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230309113631.300351-1-maxime.coquelin@redhat.com",
    "date": "2023-03-09T11:36:31",
    "name": "vhost: fix possible null pointer dereference",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "bc22b98a8d4c9eabb9c487c19004a8357cf4938d",
    "submitter": {
        "id": 512,
        "url": "http://patchwork.dpdk.org/api/people/512/?format=api",
        "name": "Maxime Coquelin",
        "email": "maxime.coquelin@redhat.com"
    },
    "delegate": {
        "id": 2642,
        "url": "http://patchwork.dpdk.org/api/users/2642/?format=api",
        "username": "mcoquelin",
        "first_name": "Maxime",
        "last_name": "Coquelin",
        "email": "maxime.coquelin@redhat.com"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20230309113631.300351-1-maxime.coquelin@redhat.com/mbox/",
    "series": [
        {
            "id": 27304,
            "url": "http://patchwork.dpdk.org/api/series/27304/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=27304",
            "date": "2023-03-09T11:36:31",
            "name": "vhost: fix possible null pointer dereference",
            "version": 1,
            "mbox": "http://patchwork.dpdk.org/series/27304/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/124894/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/124894/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 9838341E25;\n\tThu,  9 Mar 2023 12:36:39 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 2FC2340ED7;\n\tThu,  9 Mar 2023 12:36:39 +0100 (CET)",
            "from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.129.124])\n by mails.dpdk.org (Postfix) with ESMTP id 1638A400D7\n for <dev@dpdk.org>; Thu,  9 Mar 2023 12:36:37 +0100 (CET)",
            "from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com\n [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS\n (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id\n us-mta-75-p88khRkfNC625G8wvz6rzQ-1; Thu, 09 Mar 2023 06:36:36 -0500",
            "from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com\n [10.11.54.5])\n (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n (No client certificate requested)\n by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C087880D181;\n Thu,  9 Mar 2023 11:36:35 +0000 (UTC)",
            "from max-t490s.redhat.com (unknown [10.39.208.18])\n by smtp.corp.redhat.com (Postfix) with ESMTP id 9FAA3440E0;\n Thu,  9 Mar 2023 11:36:34 +0000 (UTC)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1678361797;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding;\n bh=d3aFANNIs/G+pJR8W2FZm1DU4s3mnuaP3nQZqCuvZvo=;\n b=QTPMo5a6GJUsb5WeHABtRJmdrHu1hOwiAfxFd7ogpTKExivEBQCnSOeFFDLIwVixrACnpZ\n 4LtcE0Y9sRDQSQxCxyZ0sgFRx18b91wP8+4roRmPW1bQtUoui4wYToCVvy5mO7HJrzhYvd\n yY0Fd2sSMsHNV3GMiW2JvenLsP/+u3o=",
        "X-MC-Unique": "p88khRkfNC625G8wvz6rzQ-1",
        "From": "Maxime Coquelin <maxime.coquelin@redhat.com>",
        "To": "dev@dpdk.org, mkp@redhat.com, chenbo.xia@intel.com,\n david.marchand@redhat.com",
        "Cc": "Maxime Coquelin <maxime.coquelin@redhat.com>",
        "Subject": "[PATCH] vhost: fix possible null pointer dereference",
        "Date": "Thu,  9 Mar 2023 12:36:31 +0100",
        "Message-Id": "<20230309113631.300351-1-maxime.coquelin@redhat.com>",
        "MIME-Version": "1.0",
        "X-Scanned-By": "MIMEDefang 3.1 on 10.11.54.5",
        "X-Mimecast-Spam-Score": "0",
        "X-Mimecast-Originator": "redhat.com",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain; charset=\"US-ASCII\"; x-default=true",
        "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": "When handling VHOST_USER_SET_MEM_TABLE request ending\nup in changing existing memory map, a device's memory\npointer may ends up being dereference while being NULL in\nIOTLB cache flush function.\n\nCoverity issue: 383646\nFixes: dea092d0addb (\"vhost: fix madvise arguments alignment\")\n\nSigned-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>\n---\n lib/vhost/vhost_user.c | 10 +++++-----\n 1 file changed, 5 insertions(+), 5 deletions(-)",
    "diff": "diff --git a/lib/vhost/vhost_user.c b/lib/vhost/vhost_user.c\nindex 9e361082dc..23a6a4e2bd 100644\n--- a/lib/vhost/vhost_user.c\n+++ b/lib/vhost/vhost_user.c\n@@ -1355,16 +1355,16 @@ vhost_user_set_mem_table(struct virtio_net **pdev,\n \t\t\tasync_notify = true;\n \t\t}\n \n+\t\t/* Flush IOTLB cache as previous HVAs are now invalid */\n+\t\tif (dev->features & (1ULL << VIRTIO_F_IOMMU_PLATFORM))\n+\t\t\tfor (i = 0; i < dev->nr_vring; i++)\n+\t\t\t\tvhost_user_iotlb_flush_all(dev, dev->virtqueue[i]);\n+\n \t\tfree_mem_region(dev);\n \t\trte_free(dev->mem);\n \t\tdev->mem = NULL;\n \t}\n \n-\t/* Flush IOTLB cache as previous HVAs are now invalid */\n-\tif (dev->features & (1ULL << VIRTIO_F_IOMMU_PLATFORM))\n-\t\tfor (i = 0; i < dev->nr_vring; i++)\n-\t\t\tvhost_user_iotlb_flush_all(dev, dev->virtqueue[i]);\n-\n \t/*\n \t * If VQ 0 has already been allocated, try to allocate on the same\n \t * NUMA node. It can be reallocated later in numa_realloc().\n",
    "prefixes": []
}