get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2218715,
    "url": "http://patchwork.ozlabs.org/api/patches/2218715/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/openvswitch/patch/20260401190350.443082-1-aconole@redhat.com/",
    "project": {
        "id": 47,
        "url": "http://patchwork.ozlabs.org/api/projects/47/?format=api",
        "name": "Open vSwitch",
        "link_name": "openvswitch",
        "list_id": "ovs-dev.openvswitch.org",
        "list_email": "ovs-dev@openvswitch.org",
        "web_url": "http://openvswitch.org/",
        "scm_url": "git@github.com:openvswitch/ovs.git",
        "webscm_url": "https://github.com/openvswitch/ovs",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20260401190350.443082-1-aconole@redhat.com>",
    "list_archive_url": null,
    "date": "2026-04-01T19:03:50",
    "name": "[ovs-dev,v2] checkpatch.py: Fix a catastrophic backtracking issue.",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "833cb773f76886ddb706f0f66938a621f7d480d3",
    "submitter": {
        "id": 67184,
        "url": "http://patchwork.ozlabs.org/api/people/67184/?format=api",
        "name": "Aaron Conole",
        "email": "aconole@redhat.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/openvswitch/patch/20260401190350.443082-1-aconole@redhat.com/mbox/",
    "series": [
        {
            "id": 498378,
            "url": "http://patchwork.ozlabs.org/api/series/498378/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/openvswitch/list/?series=498378",
            "date": "2026-04-01T19:03:50",
            "name": "[ovs-dev,v2] checkpatch.py: Fix a catastrophic backtracking issue.",
            "version": 2,
            "mbox": "http://patchwork.ozlabs.org/series/498378/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2218715/comments/",
    "check": "success",
    "checks": "http://patchwork.ozlabs.org/api/patches/2218715/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<ovs-dev-bounces@openvswitch.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "dev@openvswitch.org"
        ],
        "Delivered-To": [
            "patchwork-incoming@legolas.ozlabs.org",
            "ovs-dev@lists.linuxfoundation.org"
        ],
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=fajktUTm;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org\n (client-ip=2605:bc80:3010::137; helo=smtp4.osuosl.org;\n envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org)",
            "smtp4.osuosl.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key)\n header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=fajktUTm",
            "smtp4.osuosl.org; dmarc=pass (p=quarantine dis=none)\n header.from=redhat.com"
        ],
        "Received": [
            "from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fmDt94H4nz1yCp\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 02 Apr 2026 06:04:01 +1100 (AEDT)",
            "from localhost (localhost [127.0.0.1])\n\tby smtp4.osuosl.org (Postfix) with ESMTP id 02A9941E1E;\n\tWed,  1 Apr 2026 19:04:00 +0000 (UTC)",
            "from smtp4.osuosl.org ([127.0.0.1])\n by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP\n id Wj5H7TzgBscL; Wed,  1 Apr 2026 19:03:59 +0000 (UTC)",
            "from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56])\n\tby smtp4.osuosl.org (Postfix) with ESMTPS id 1756E41E17;\n\tWed,  1 Apr 2026 19:03:59 +0000 (UTC)",
            "from lf-lists.osuosl.org (localhost [127.0.0.1])\n\tby lists.linuxfoundation.org (Postfix) with ESMTP id EB8F4C0070;\n\tWed,  1 Apr 2026 19:03:58 +0000 (UTC)",
            "from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n by lists.linuxfoundation.org (Postfix) with ESMTP id 1C93AC003D\n for <dev@openvswitch.org>; Wed,  1 Apr 2026 19:03:58 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n by smtp4.osuosl.org (Postfix) with ESMTP id 08BFF41E1A\n for <dev@openvswitch.org>; Wed,  1 Apr 2026 19:03:58 +0000 (UTC)",
            "from smtp4.osuosl.org ([127.0.0.1])\n by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP\n id L5nk7S1aJBlU for <dev@openvswitch.org>;\n Wed,  1 Apr 2026 19:03:57 +0000 (UTC)",
            "from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.129.124])\n by smtp4.osuosl.org (Postfix) with ESMTPS id E279141E17\n for <dev@openvswitch.org>; Wed,  1 Apr 2026 19:03:55 +0000 (UTC)",
            "from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com\n (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by\n relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3,\n cipher=TLS_AES_256_GCM_SHA384) id us-mta-619-P6SoNxpUOi2CReOjpcET2Q-1; Wed,\n 01 Apr 2026 15:03:52 -0400",
            "from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com\n (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n (No client certificate requested)\n by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS\n id C375D19560B4\n for <dev@openvswitch.org>; Wed,  1 Apr 2026 19:03:51 +0000 (UTC)",
            "from RHTRH0061144.redhat.com (unknown [10.22.88.33])\n by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP\n id 60929180035F\n for <dev@openvswitch.org>; Wed,  1 Apr 2026 19:03:51 +0000 (UTC)"
        ],
        "X-Virus-Scanned": [
            "amavis at osuosl.org",
            "amavis at osuosl.org"
        ],
        "X-Comment": "SPF check N/A for local connections - client-ip=140.211.9.56;\n helo=lists.linuxfoundation.org;\n envelope-from=ovs-dev-bounces@openvswitch.org; receiver=<UNKNOWN> ",
        "DKIM-Filter": [
            "OpenDKIM Filter v2.11.0 smtp4.osuosl.org 1756E41E17",
            "OpenDKIM Filter v2.11.0 smtp4.osuosl.org E279141E17"
        ],
        "Received-SPF": "Pass (mailfrom) identity=mailfrom; client-ip=170.10.129.124;\n helo=us-smtp-delivery-124.mimecast.com; envelope-from=aconole@redhat.com;\n receiver=<UNKNOWN>",
        "DMARC-Filter": "OpenDMARC Filter v1.4.2 smtp4.osuosl.org E279141E17",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1775070234;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding;\n bh=+puEMX86LnlEBGsXdj0E1E5AE/GyNJKSE794MmyiH0A=;\n b=fajktUTmOxmqSsDTQhUy9nsFZfD7OuDyxita4V7rt1BFFoafIAGcbiKqmuHGT1a/a4P25H\n UtM+OqcXtTIXRHFZI+5fbkCNwqXwC/bwfzkwPisWSk//Fn0K8QbsZehaVwqjvBhOBAkzTj\n EnUFQZyckbjxoE4evD7GT/DmG03dQmc=",
        "X-MC-Unique": "P6SoNxpUOi2CReOjpcET2Q-1",
        "X-Mimecast-MFC-AGG-ID": "P6SoNxpUOi2CReOjpcET2Q_1775070231",
        "To": "dev@openvswitch.org",
        "Date": "Wed,  1 Apr 2026 15:03:50 -0400",
        "Message-ID": "<20260401190350.443082-1-aconole@redhat.com>",
        "MIME-Version": "1.0",
        "X-Scanned-By": "MIMEDefang 3.4.1 on 10.30.177.111",
        "X-Mimecast-Spam-Score": "0",
        "X-Mimecast-MFC-PROC-ID": "JUDzGZY4k0qNHB1IlAdY_aRLWqZifOCaEuY2j4WXsIc_1775070231",
        "X-Mimecast-Originator": "redhat.com",
        "Subject": "[ovs-dev] [PATCH v2] checkpatch.py: Fix a catastrophic backtracking\n issue.",
        "X-BeenThere": "ovs-dev@openvswitch.org",
        "X-Mailman-Version": "2.1.30",
        "Precedence": "list",
        "List-Id": "<ovs-dev.openvswitch.org>",
        "List-Unsubscribe": "<https://mail.openvswitch.org/mailman/options/ovs-dev>,\n <mailto:ovs-dev-request@openvswitch.org?subject=unsubscribe>",
        "List-Archive": "<http://mail.openvswitch.org/pipermail/ovs-dev/>",
        "List-Post": "<mailto:ovs-dev@openvswitch.org>",
        "List-Help": "<mailto:ovs-dev-request@openvswitch.org?subject=help>",
        "List-Subscribe": "<https://mail.openvswitch.org/mailman/listinfo/ovs-dev>,\n <mailto:ovs-dev-request@openvswitch.org?subject=subscribe>",
        "From": "Aaron Conole via dev <ovs-dev@openvswitch.org>",
        "Reply-To": "Aaron Conole <aconole@redhat.com>",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Errors-To": "ovs-dev-bounces@openvswitch.org",
        "Sender": "\"dev\" <ovs-dev-bounces@openvswitch.org>"
    },
    "content": "The regex_if_macros accidentally implements a catastrophic backtracking\ncase during matching because it forces a greedy match and evaluation that\ncauses an explosion of combinations depending on how many blocks appear\nin a parenthesized expression.\n\nConsider an expression like:\n\n  if (a b c d e f g h i j k) {\n\nThe regex engine will have to create an exponential number of matches that\ncan overload memory and cpu requirements.\n\nFix this by switching the inner-content match to use a non-greedy approach.\n\nFixes: aacad8685e3d (\"checkpatch: Fix regexp for if, while, etc inside macros.\")\nSigned-off-by: Aaron Conole <aconole@redhat.com>\n---\nv1->v2: The original proposed fix was requiring a second non-whitespace\n        character, which caused 'the if (a) { ' case to fail due to the\n        non-greedy match swallowing the closing paren and failing the\n        match.  Now make second non-greedy group as optional.\n\n utilities/checkpatch.py | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)",
    "diff": "diff --git a/utilities/checkpatch.py b/utilities/checkpatch.py\nindex 38d6f02c79..d18a8aacff 100755\n--- a/utilities/checkpatch.py\n+++ b/utilities/checkpatch.py\n@@ -158,7 +158,7 @@ __regex_has_xxx_mark = re.compile(r'.*xxx.*', re.IGNORECASE)\n __regex_added_doc_rst = re.compile(\n                     r'\\ndiff .*Documentation/.*rst\\nnew file mode')\n __regex_empty_return = re.compile(r'\\s*return;')\n-__regex_if_macros = re.compile(r'^ +(%s) \\([\\S]([\\s\\S]+[\\S])*\\) { +\\\\' %\n+__regex_if_macros = re.compile(r'^ +(%s) \\([\\S](?:[\\s\\S]*?[\\S])?\\) { +\\\\' %\n                                __parenthesized_constructs)\n __regex_nonascii_characters = re.compile(\"[^\\u0000-\\u007f]\")\n __regex_efgrep = re.compile(r'.*[ef]grep.*$')\n",
    "prefixes": [
        "ovs-dev",
        "v2"
    ]
}