get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2227641,
    "url": "http://patchwork.ozlabs.org/api/patches/2227641/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260424031259.289211-1-zhaoguohan@kylinos.cn/",
    "project": {
        "id": 14,
        "url": "http://patchwork.ozlabs.org/api/projects/14/?format=api",
        "name": "QEMU Development",
        "link_name": "qemu-devel",
        "list_id": "qemu-devel.nongnu.org",
        "list_email": "qemu-devel@nongnu.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20260424031259.289211-1-zhaoguohan@kylinos.cn>",
    "list_archive_url": null,
    "date": "2026-04-24T03:12:59",
    "name": "vfio-user: reject malformed migration capabilities",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "68a780d70e16aa8311ed0f0d13e33dd7a67cc118",
    "submitter": {
        "id": 92952,
        "url": "http://patchwork.ozlabs.org/api/people/92952/?format=api",
        "name": "GuoHan Zhao",
        "email": "zhaoguohan@kylinos.cn"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260424031259.289211-1-zhaoguohan@kylinos.cn/mbox/",
    "series": [
        {
            "id": 501292,
            "url": "http://patchwork.ozlabs.org/api/series/501292/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=501292",
            "date": "2026-04-24T03:12:59",
            "name": "vfio-user: reject malformed migration capabilities",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/501292/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2227641/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2227641/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>",
        "X-Original-To": "incoming@patchwork.ozlabs.org",
        "Delivered-To": "patchwork-incoming@legolas.ozlabs.org",
        "Authentication-Results": "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org\n (client-ip=209.51.188.17; helo=lists1p.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)",
        "Received": [
            "from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17])\n\t(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g1yjK0FbVz1xvV\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 24 Apr 2026 13:13:57 +1000 (AEST)",
            "from localhost ([::1] helo=lists1p.gnu.org)\n\tby lists1p.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces@nongnu.org>)\n\tid 1wG6z0-0000UX-FQ; Thu, 23 Apr 2026 23:13:34 -0400",
            "from eggs.gnu.org ([2001:470:142:3::10])\n by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <zhaoguohan@kylinos.cn>)\n id 1wG6yy-0000UH-6w\n for qemu-devel@nongnu.org; Thu, 23 Apr 2026 23:13:32 -0400",
            "from mailgw.kylinos.cn ([124.126.103.232])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <zhaoguohan@kylinos.cn>)\n id 1wG6yv-00082J-Gl\n for qemu-devel@nongnu.org; Thu, 23 Apr 2026 23:13:31 -0400",
            "from zgh-vmware-virtual-platform.localdomain [(116.128.244.171)] by\n mailgw.kylinos.cn (envelope-from <zhaoguohan@kylinos.cn>)\n (Generic MTA with TLSv1.3 TLS_AES_256_GCM_SHA384 256/256)\n with ESMTP id 894771053; Fri, 24 Apr 2026 11:13:22 +0800"
        ],
        "X-UUID": [
            "8d3b9d363f8b11f1aa26b74ffac11d73-20260424",
            "8d3b9d363f8b11f1aa26b74ffac11d73-20260424"
        ],
        "X-CID-O-RULE": "Release_Ham",
        "X-CID-RULE": "Release_Ham",
        "X-CID-O-INFO": "VERSION:1.3.12, REQID:9af03cf7-b043-48d0-8c8f-ec42a42dcaad,\n IP:15,\n URL:0,TC:0,Content:0,EDM:0,RT:0,SF:-30,FILE:0,BULK:0,RULE:Release_Ham,ACTI\n ON:release,TS:-15",
        "X-CID-INFO": "VERSION:1.3.12, REQID:9af03cf7-b043-48d0-8c8f-ec42a42dcaad, IP:15,\n UR\n L:0,TC:0,Content:0,EDM:0,RT:0,SF:-30,FILE:0,BULK:0,RULE:Release_Ham,ACTION\n :release,TS:-15",
        "X-CID-META": "VersionHash:e7bac3a, CLOUDID:2eb732a23e195489e441dc72d5685c1e,\n BulkI\n D:260424111322VCYFYAIK,BulkQuantity:0,Recheck:0,SF:10|38|66|78|102|123|127\n |898,TC:nil,Content:0|15|50,EDM:-3,IP:-2,URL:0,File:nil,RT:nil,Bulk:nil,QS\n :nil,BEC:nil,COL:0,OSI:0,OSA:0,AV:0,LES:1,SPR:NO,DKR:0,DKP:0,BRR:0,BRE:0,A\n RC:0",
        "X-CID-BVR": "2,SSN|SDN",
        "X-CID-BAS": "2,SSN|SDN,0,_",
        "X-CID-FACTOR": "TF_CID_SPAM_SNR",
        "X-CID-RHF": "D41D8CD98F00B204E9800998ECF8427E",
        "X-User": "zhaoguohan@kylinos.cn",
        "From": "zhaoguohan@kylinos.cn",
        "To": "John Levon <john.levon@nutanix.com>,\n Thanos Makatos <thanos.makatos@nutanix.com>, =?utf-8?q?C=C3=A9dric_Le_Goate?=\n\t=?utf-8?q?r?= <clg@redhat.com>",
        "Cc": "qemu-devel@nongnu.org",
        "Subject": "[PATCH] vfio-user: reject malformed migration capabilities",
        "Date": "Fri, 24 Apr 2026 11:12:59 +0800",
        "Message-ID": "<20260424031259.289211-1-zhaoguohan@kylinos.cn>",
        "X-Mailer": "git-send-email 2.43.0",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Received-SPF": "pass client-ip=124.126.103.232;\n envelope-from=zhaoguohan@kylinos.cn; helo=mailgw.kylinos.cn",
        "X-Spam_score_int": "-18",
        "X-Spam_score": "-1.9",
        "X-Spam_bar": "-",
        "X-Spam_report": "(-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001,\n SPF_PASS=-0.001, UNPARSEABLE_RELAY=0.001 autolearn=ham autolearn_force=no",
        "X-Spam_action": "no action",
        "X-BeenThere": "qemu-devel@nongnu.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "qemu development <qemu-devel.nongnu.org>",
        "List-Unsubscribe": "<https://lists.nongnu.org/mailman/options/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>",
        "List-Archive": "<https://lists.nongnu.org/archive/html/qemu-devel>",
        "List-Post": "<mailto:qemu-devel@nongnu.org>",
        "List-Help": "<mailto:qemu-devel-request@nongnu.org?subject=help>",
        "List-Subscribe": "<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=subscribe>",
        "Errors-To": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org",
        "Sender": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org"
    },
    "content": "From: GuoHan Zhao <zhaoguohan@kylinos.cn>\n\ncheck_migr() sets an error when the migration capability is not an object,\nbut still returns true.  This lets version negotiation continue with an\nError set and reports the wrong capability name in the diagnostic.\n\nReturn false for the malformed capability, and report the migration\ncapability name.\n\nFixes: 36227628d824 (\"vfio-user: implement message send infrastructure\")\nSigned-off-by: GuoHan Zhao <zhaoguohan@kylinos.cn>\n---\n hw/vfio-user/proxy.c | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/hw/vfio-user/proxy.c b/hw/vfio-user/proxy.c\nindex 314dfd23d8af..8b7cc36231ab 100644\n--- a/hw/vfio-user/proxy.c\n+++ b/hw/vfio-user/proxy.c\n@@ -1190,8 +1190,8 @@ static bool check_migr(VFIOUserProxy *proxy, QObject *qobj, Error **errp)\n     QDict *qdict = qobject_to(QDict, qobj);\n \n     if (qdict == NULL) {\n-        error_setg(errp, \"malformed %s\", VFIO_USER_CAP_MAX_FDS);\n-        return true;\n+        error_setg(errp, \"malformed %s\", VFIO_USER_CAP_MIGR);\n+        return false;\n     }\n     return caps_parse(proxy, qdict, caps_migr, errp);\n }\n",
    "prefixes": []
}