get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 122605,
    "url": "https://patches.dpdk.org/api/patches/122605/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20230127165540.37863-3-maxime.coquelin@redhat.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": "<20230127165540.37863-3-maxime.coquelin@redhat.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230127165540.37863-3-maxime.coquelin@redhat.com",
    "date": "2023-01-27T16:55:39",
    "name": "[v2,2/2] vhost: fix possible FD leaks on MSG_TRUNC and MSG_CTRUNC",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "cbe8225c985189a0a96e2e699bc547d33082f869",
    "submitter": {
        "id": 512,
        "url": "https://patches.dpdk.org/api/people/512/?format=api",
        "name": "Maxime Coquelin",
        "email": "maxime.coquelin@redhat.com"
    },
    "delegate": {
        "id": 2642,
        "url": "https://patches.dpdk.org/api/users/2642/?format=api",
        "username": "mcoquelin",
        "first_name": "Maxime",
        "last_name": "Coquelin",
        "email": "maxime.coquelin@redhat.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20230127165540.37863-3-maxime.coquelin@redhat.com/mbox/",
    "series": [
        {
            "id": 26670,
            "url": "https://patches.dpdk.org/api/series/26670/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=26670",
            "date": "2023-01-27T16:55:37",
            "name": "Vhost: fix FD leaks and improve logs",
            "version": 2,
            "mbox": "https://patches.dpdk.org/series/26670/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/122605/comments/",
    "check": "fail",
    "checks": "https://patches.dpdk.org/api/patches/122605/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 0261F424A0;\n\tFri, 27 Jan 2023 17:56:01 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 4F52642D54;\n\tFri, 27 Jan 2023 17:55:53 +0100 (CET)",
            "from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.133.124])\n by mails.dpdk.org (Postfix) with ESMTP id 6B4A940695\n for <dev@dpdk.org>; Fri, 27 Jan 2023 17:55:51 +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-46-nTy4QXTmMo-eKGrGXXcXHQ-1; Fri, 27 Jan 2023 11:55:46 -0500",
            "from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com\n [10.11.54.10])\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 6B50C858F09;\n Fri, 27 Jan 2023 16:55:46 +0000 (UTC)",
            "from max-t490s.redhat.com (unknown [10.39.208.33])\n by smtp.corp.redhat.com (Postfix) with ESMTP id 46FAF492B01;\n Fri, 27 Jan 2023 16:55:45 +0000 (UTC)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1674838551;\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 in-reply-to:in-reply-to:references:references;\n bh=36YJtjCWYppfEqWqLJ6ZCFt36AXYxDkAOe+BxUsczSQ=;\n b=Wq8VSmD5JIfuXUzP7AuIVwxns3pP0Jw0wlSPfr7qq8f9q39FPRPb7Ha+BL5btixzjpjPQa\n cY7eJ+hjt1RqeXrFMfx/J2MjXA/SAVV1cgw0O3F5kddImYZl+yDN/vDx4Fv6N66ab3l+Ni\n /G4gSUHFCCm/H3ezW5bcNEEsMBlb6BE=",
        "X-MC-Unique": "nTy4QXTmMo-eKGrGXXcXHQ-1",
        "From": "Maxime Coquelin <maxime.coquelin@redhat.com>",
        "To": "dev@dpdk.org,\n\tdavid.marchand@redhat.com,\n\tchenbo.xia@intel.com",
        "Cc": "Maxime Coquelin <maxime.coquelin@redhat.com>,\n\tstable@dpdk.org",
        "Subject": "[PATCH v2 2/2] vhost: fix possible FD leaks on MSG_TRUNC and\n MSG_CTRUNC",
        "Date": "Fri, 27 Jan 2023 17:55:39 +0100",
        "Message-Id": "<20230127165540.37863-3-maxime.coquelin@redhat.com>",
        "In-Reply-To": "<20230127165540.37863-1-maxime.coquelin@redhat.com>",
        "References": "<20230127165540.37863-1-maxime.coquelin@redhat.com>",
        "MIME-Version": "1.0",
        "X-Scanned-By": "MIMEDefang 3.1 on 10.11.54.10",
        "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": "This patch fixes possible FDs leaks when truncation happens\non either the message buffer or its control data. Indeed,\nby returning early, it did not let a chance to retrieve the\nFDs passed as ancillary data, and so caused a potential FDs\nleak.\n\nThis patch fixes this by extracting the FDs from the\nancillary data as long as recvmsg() call succeeded. It also\nimproves the logs to differentiate between MSG_TRUNC and\nMSG_CTRUNC.\n\nFixes: bf472259dde6 (\"vhost: fix possible denial of service by leaking FDs\")\nCc: stable@dpdk.org\n\nSigned-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>\n---\n lib/vhost/socket.c | 8 +++++---\n 1 file changed, 5 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/lib/vhost/socket.c b/lib/vhost/socket.c\nindex 863a6f6d52..669c322e12 100644\n--- a/lib/vhost/socket.c\n+++ b/lib/vhost/socket.c\n@@ -129,10 +129,12 @@ read_fd_message(char *ifname, int sockfd, char *buf, int buflen, int *fds, int m\n \t\treturn ret;\n \t}\n \n-\tif (msgh.msg_flags & (MSG_TRUNC | MSG_CTRUNC)) {\n+\tif (msgh.msg_flags & MSG_TRUNC)\n \t\tVHOST_LOG_CONFIG(ifname, ERR, \"truncated msg (fd %d)\\n\", sockfd);\n-\t\treturn -1;\n-\t}\n+\n+\t/* MSG_CTRUNC may be caused by LSM misconfiguration */\n+\tif (msgh.msg_flags & MSG_CTRUNC)\n+\t\tVHOST_LOG_CONFIG(ifname, ERR, \"truncated control data (fd %d)\\n\", sockfd);\n \n \tfor (cmsg = CMSG_FIRSTHDR(&msgh); cmsg != NULL;\n \t\tcmsg = CMSG_NXTHDR(&msgh, cmsg)) {\n",
    "prefixes": [
        "v2",
        "2/2"
    ]
}