get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2216640,
    "url": "http://patchwork.ozlabs.org/api/patches/2216640/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20260327021403.214713-8-usama.arif@linux.dev/",
    "project": {
        "id": 2,
        "url": "http://patchwork.ozlabs.org/api/projects/2/?format=api",
        "name": "Linux PPC development",
        "link_name": "linuxppc-dev",
        "list_id": "linuxppc-dev.lists.ozlabs.org",
        "list_email": "linuxppc-dev@lists.ozlabs.org",
        "web_url": "https://github.com/linuxppc/wiki/wiki",
        "scm_url": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git",
        "webscm_url": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/",
        "list_archive_url": "https://lore.kernel.org/linuxppc-dev/",
        "list_archive_url_format": "https://lore.kernel.org/linuxppc-dev/{}/",
        "commit_url_format": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/commit/?id={}"
    },
    "msgid": "<20260327021403.214713-8-usama.arif@linux.dev>",
    "list_archive_url": "https://lore.kernel.org/linuxppc-dev/20260327021403.214713-8-usama.arif@linux.dev/",
    "date": "2026-03-27T02:08:49",
    "name": "[v3,07/24] mm: thp: retry on split failure in change_pmd_range()",
    "commit_ref": null,
    "pull_url": null,
    "state": "handled-elsewhere",
    "archived": false,
    "hash": "6b6ce580119d591caee8c7a4d83ddd3076a4c9dc",
    "submitter": {
        "id": 92719,
        "url": "http://patchwork.ozlabs.org/api/people/92719/?format=api",
        "name": "Usama Arif",
        "email": "usama.arif@linux.dev"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20260327021403.214713-8-usama.arif@linux.dev/mbox/",
    "series": [
        {
            "id": 497678,
            "url": "http://patchwork.ozlabs.org/api/series/497678/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=497678",
            "date": "2026-03-27T02:08:43",
            "name": "[v3,01/24] mm: thp: make split_huge_pmd functions return int for error propagation",
            "version": 3,
            "mbox": "http://patchwork.ozlabs.org/series/497678/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2216640/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2216640/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <linuxppc-dev+bounces-18850-incoming=patchwork.ozlabs.org@lists.ozlabs.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "linuxppc-dev@lists.ozlabs.org"
        ],
        "Delivered-To": "patchwork-incoming@legolas.ozlabs.org",
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256\n header.s=key1 header.b=u0/m9ASD;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org\n (client-ip=112.213.38.117; helo=lists.ozlabs.org;\n envelope-from=linuxppc-dev+bounces-18850-incoming=patchwork.ozlabs.org@lists.ozlabs.org;\n receiver=patchwork.ozlabs.org)",
            "lists.ozlabs.org;\n arc=none smtp.remote-ip=95.215.58.188",
            "lists.ozlabs.org;\n dmarc=pass (p=none dis=none) header.from=linux.dev",
            "lists.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256\n header.s=key1 header.b=u0/m9ASD;\n\tdkim-atps=neutral",
            "lists.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=linux.dev\n (client-ip=95.215.58.188; helo=out-188.mta1.migadu.com;\n envelope-from=usama.arif@linux.dev; receiver=lists.ozlabs.org)"
        ],
        "Received": [
            "from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fhkkm3Qh0z1y1j\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 27 Mar 2026 13:15:28 +1100 (AEDT)",
            "from boromir.ozlabs.org (localhost [127.0.0.1])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 4fhkkZ5BGcz2yjn;\n\tFri, 27 Mar 2026 13:15:18 +1100 (AEDT)",
            "from out-188.mta1.migadu.com (out-188.mta1.migadu.com\n [95.215.58.188])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n\t(No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 4fhkkY5kzLz2xR4\n\tfor <linuxppc-dev@lists.ozlabs.org>; Fri, 27 Mar 2026 13:15:17 +1100 (AEDT)"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1774577718;\n\tcv=none;\n b=gBKdUq3LnD7mseAPrNk2O51sQQFRCXgrEZlUMe8zEKI1anT5XhZaVu+tM1UiCcoLDd8RJvW7wkgAMSAE/6IBVV0xqDpteen7lnKpHUr5begZzrWhQLmDvkRo8RhGajnYEdIn29BjlWDysP/tSDIOGvt2IVzWRmnGiUvMH864oNxMz5NxEUfvNLRF5Q+E5I+OLxBR8WeT9etvFmOBtfB/QxojPDzZtbGRSQMzyRo5PEzc2ZOo+N9xzdVfq97+P895iSLrr+9N5SylgQ85rt7fD7xlkwFrkxEx32Nft/5F4WtDbqDP+xuRfuCAjCpV6aPyyujA/WI0Y7yoWBqjCa8IQQ==",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707;\n\tt=1774577718; c=relaxed/relaxed;\n\tbh=YEV2JraEcWrcU0ZBvWVbflxwtxhTRk4GT952CPZuA50=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version:Content-Type;\n b=hG+uOSTeGneL9R9JKSq2AxVJ/t76WoelHs7igiOkFC2du0BLlEb58OrxKDE0To6a1BEhtfNwG/L4V7+Towd1bgvu+U9o/mHK/dQEH1XcgqPc9ZeRvtjJXWPEq9RULVz1Bjb1CmnSMwgq1lz41HFRyzyXVzztalloUeykgY33jhSUOlu34d+IzSJS//xkRj9ePttA+j2QWyx7AvQjJbIOVqo379ujjH1O+cfKScQvJNPqP6xmOrNWnV2PQIZJnIfJO8hKn42l02yWRm8rFbkRArjLFk43nUjYm18lDYqnPXi5HpZBiC+Csn0IhjZGkJL1lXQgPXQcbA2/nKhphq9ajQ==",
        "ARC-Authentication-Results": "i=1; lists.ozlabs.org;\n dmarc=pass (p=none dis=none) header.from=linux.dev; dkim=pass (1024-bit key;\n unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256\n header.s=key1 header.b=u0/m9ASD; dkim-atps=neutral;\n spf=pass (client-ip=95.215.58.188; helo=out-188.mta1.migadu.com;\n envelope-from=usama.arif@linux.dev;\n receiver=lists.ozlabs.org) smtp.mailfrom=linux.dev",
        "X-Report-Abuse": "Please report any abuse attempt to abuse@migadu.com and\n include these headers.",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1;\n\tt=1774577697;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\t to:to:cc:cc:mime-version:mime-version:content-type:content-type:\n\t content-transfer-encoding:content-transfer-encoding:\n\t in-reply-to:in-reply-to:references:references;\n\tbh=YEV2JraEcWrcU0ZBvWVbflxwtxhTRk4GT952CPZuA50=;\n\tb=u0/m9ASDIyRTjYzRS9sw7YydNLKfppOx0RMOs35/i/y5Ni21Cb1jtxqZNy/yP+Kqi/QxXC\n\tk6dOK7+inks9R2SF5uInEMSGMi6RkUSEsV/nxpnQv+EtYjG/nOmRguIxK19Cw1btj+1eHv\n\tO/E1Nq01pdgTuk7/bByUiSP3Dm/a2Jo=",
        "From": "Usama Arif <usama.arif@linux.dev>",
        "To": "Andrew Morton <akpm@linux-foundation.org>,\n\tdavid@kernel.org,\n\tLorenzo Stoakes <ljs@kernel.org>,\n\twilly@infradead.org,\n\tlinux-mm@kvack.org",
        "Cc": "fvdl@google.com,\n\thannes@cmpxchg.org,\n\triel@surriel.com,\n\tshakeel.butt@linux.dev,\n\tkas@kernel.org,\n\tbaohua@kernel.org,\n\tdev.jain@arm.com,\n\tbaolin.wang@linux.alibaba.com,\n\tnpache@redhat.com,\n\tLiam.Howlett@oracle.com,\n\tryan.roberts@arm.com,\n\tVlastimil Babka <vbabka@kernel.org>,\n\tlance.yang@linux.dev,\n\tlinux-kernel@vger.kernel.org,\n\tkernel-team@meta.com,\n\tmaddy@linux.ibm.com,\n\tmpe@ellerman.id.au,\n\tlinuxppc-dev@lists.ozlabs.org,\n\thca@linux.ibm.com,\n\tgor@linux.ibm.com,\n\tagordeev@linux.ibm.com,\n\tborntraeger@linux.ibm.com,\n\tsvens@linux.ibm.com,\n\tlinux-s390@vger.kernel.org,\n\tUsama Arif <usama.arif@linux.dev>",
        "Subject": "[v3 07/24] mm: thp: retry on split failure in change_pmd_range()",
        "Date": "Thu, 26 Mar 2026 19:08:49 -0700",
        "Message-ID": "<20260327021403.214713-8-usama.arif@linux.dev>",
        "In-Reply-To": "<20260327021403.214713-1-usama.arif@linux.dev>",
        "References": "<20260327021403.214713-1-usama.arif@linux.dev>",
        "X-Mailing-List": "linuxppc-dev@lists.ozlabs.org",
        "List-Id": "<linuxppc-dev.lists.ozlabs.org>",
        "List-Help": "<mailto:linuxppc-dev+help@lists.ozlabs.org>",
        "List-Owner": "<mailto:linuxppc-dev+owner@lists.ozlabs.org>",
        "List-Post": "<mailto:linuxppc-dev@lists.ozlabs.org>",
        "List-Archive": "<https://lore.kernel.org/linuxppc-dev/>,\n  <https://lists.ozlabs.org/pipermail/linuxppc-dev/>",
        "List-Subscribe": "<mailto:linuxppc-dev+subscribe@lists.ozlabs.org>,\n  <mailto:linuxppc-dev+subscribe-digest@lists.ozlabs.org>,\n  <mailto:linuxppc-dev+subscribe-nomail@lists.ozlabs.org>",
        "List-Unsubscribe": "<mailto:linuxppc-dev+unsubscribe@lists.ozlabs.org>",
        "Precedence": "list",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "Content-Transfer-Encoding": "8bit",
        "X-Migadu-Flow": "FLOW_OUT",
        "X-Spam-Status": "No, score=-0.9 required=3.0 tests=DKIM_SIGNED,DKIM_VALID,\n\tDKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS\n\tautolearn=disabled version=4.0.1 OzLabs 8",
        "X-Spam-Checker-Version": "SpamAssassin 4.0.1 (2024-03-25) on lists.ozlabs.org"
    },
    "content": "change_pmd_range() splits a huge PMD when mprotect() targets a sub-PMD\nrange or when VMA flags require per-PTE protection bits that can't be\nrepresented at PMD granularity.\n\nIf pte_alloc_one() fails inside __split_huge_pmd(), the huge PMD remains\nintact. Without this change, change_pte_range() would return -EAGAIN\nbecause pte_offset_map_lock() returns NULL for a huge PMD, sending the\ncode back to the 'again' label to retry the split—without ever calling\ncond_resched().\n\nNow that __split_huge_pmd() returns an error code, handle it explicitly:\nyield the CPU with cond_resched() and retry via goto again, giving other\ntasks a chance to free memory.\n\nTrying to return an error all the way to change_protection_range would\nnot work as it would leave a memory range with new protections, and\nothers unchanged, with no easy way to roll back the already modified\nentries (and previous splits). __split_huge_pmd only requires an\norder-0 allocation and is extremely unlikely to fail.\n\nSigned-off-by: Usama Arif <usama.arif@linux.dev>\n---\n mm/mprotect.c | 11 ++++++++++-\n 1 file changed, 10 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/mm/mprotect.c b/mm/mprotect.c\nindex 110d47a36d4bb..e39e96963da8b 100644\n--- a/mm/mprotect.c\n+++ b/mm/mprotect.c\n@@ -477,7 +477,16 @@ static inline long change_pmd_range(struct mmu_gather *tlb,\n \t\tif (pmd_is_huge(_pmd)) {\n \t\t\tif ((next - addr != HPAGE_PMD_SIZE) ||\n \t\t\t    pgtable_split_needed(vma, cp_flags)) {\n-\t\t\t\t__split_huge_pmd(vma, pmd, addr, false);\n+\t\t\t\tret = __split_huge_pmd(vma, pmd, addr, false);\n+\t\t\t\tif (ret) {\n+\t\t\t\t\t/*\n+\t\t\t\t\t * Yield and retry. Other tasks\n+\t\t\t\t\t * may free memory while we\n+\t\t\t\t\t * reschedule.\n+\t\t\t\t\t */\n+\t\t\t\t\tcond_resched();\n+\t\t\t\t\tgoto again;\n+\t\t\t\t}\n \t\t\t\t/*\n \t\t\t\t * For file-backed, the pmd could have been\n \t\t\t\t * cleared; make sure pmd populated if\n",
    "prefixes": [
        "v3",
        "07/24"
    ]
}