get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 93385,
    "url": "https://patches.dpdk.org/api/patches/93385/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20210524085812.15916-1-thierry.herbelot@6wind.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": "<20210524085812.15916-1-thierry.herbelot@6wind.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210524085812.15916-1-thierry.herbelot@6wind.com",
    "date": "2021-05-24T08:58:12",
    "name": "vhost/vhost_crypto: do not use possibly NULL Pointers",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "ee85f18d2e2328148c5bf72dac8b0fe4a7fdeda7",
    "submitter": {
        "id": 897,
        "url": "https://patches.dpdk.org/api/people/897/?format=api",
        "name": "Thierry Herbelot",
        "email": "thierry.herbelot@6wind.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20210524085812.15916-1-thierry.herbelot@6wind.com/mbox/",
    "series": [
        {
            "id": 17083,
            "url": "https://patches.dpdk.org/api/series/17083/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=17083",
            "date": "2021-05-24T08:58:12",
            "name": "vhost/vhost_crypto: do not use possibly NULL Pointers",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/17083/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/93385/comments/",
    "check": "fail",
    "checks": "https://patches.dpdk.org/api/patches/93385/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 88C6CA0547;\n\tMon, 24 May 2021 10:58:20 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 7878A410FE;\n\tMon, 24 May 2021 10:58:20 +0200 (CEST)",
            "from proxy.6wind.com (host.78.145.23.62.rev.coltfrance.com\n [62.23.145.78]) by mails.dpdk.org (Postfix) with ESMTP id 5D9FD4003E;\n Mon, 24 May 2021 10:58:19 +0200 (CEST)",
            "from localhost (unknown [10.16.0.39])\n by proxy.6wind.com (Postfix) with ESMTP id 449389B479C;\n Mon, 24 May 2021 10:58:19 +0200 (CEST)"
        ],
        "From": "Thierry Herbelot <thierry.herbelot@6wind.com>",
        "To": "dev@dpdk.org",
        "Cc": "Thierry Herbelot <thierry.herbelot@6wind.com>,\n Thomas Monjalon <thomas@monjalon.net>, stable@dpdk.org,\n Maxime Coquelin <maxime.coquelin@redhat.com>,\n Chenbo Xia <chenbo.xia@intel.com>",
        "Date": "Mon, 24 May 2021 10:58:12 +0200",
        "Message-Id": "<20210524085812.15916-1-thierry.herbelot@6wind.com>",
        "X-Mailer": "git-send-email 2.29.2",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH] vhost/vhost_crypto: do not use possibly NULL\n Pointers",
        "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",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Use vc_req only after it was checked not to be NULL.\n\nFixes: 2d962bb736521 (\"vhost/crypto: fix possible TOCTOU attack\")\nCc: stable@dpdk.org\nCc: Maxime Coquelin <maxime.coquelin@redhat.com>\nCc: Chenbo Xia <chenbo.xia@intel.com>\n\nSigned-off-by: Thierry Herbelot <thierry.herbelot@6wind.com>\n---\n lib/vhost/vhost_crypto.c | 6 ++++--\n 1 file changed, 4 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/lib/vhost/vhost_crypto.c b/lib/vhost/vhost_crypto.c\nindex 6689c52df239..5113a552bd2e 100644\n--- a/lib/vhost/vhost_crypto.c\n+++ b/lib/vhost/vhost_crypto.c\n@@ -1337,13 +1337,15 @@ vhost_crypto_finalize_one_request(struct rte_crypto_op *op,\n \tstruct rte_mbuf *m_src = op->sym->m_src;\n \tstruct rte_mbuf *m_dst = op->sym->m_dst;\n \tstruct vhost_crypto_data_req *vc_req = rte_mbuf_to_priv(m_src);\n-\tstruct vhost_virtqueue *vq = vc_req->vq;\n-\tuint16_t used_idx = vc_req->desc_idx, desc_idx;\n+\tstruct vhost_virtqueue *vq;\n+\tuint16_t used_idx;\n \n \tif (unlikely(!vc_req)) {\n \t\tVC_LOG_ERR(\"Failed to retrieve vc_req\");\n \t\treturn NULL;\n \t}\n+\tvq = vc_req->vq;\n+\tused_idx = vc_req->desc_idx, desc_idx;\n \n \tif (old_vq && (vq != old_vq))\n \t\treturn vq;\n",
    "prefixes": []
}