get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2216646,
    "url": "http://patchwork.ozlabs.org/api/patches/2216646/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20260327021403.214713-14-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-14-usama.arif@linux.dev>",
    "list_archive_url": "https://lore.kernel.org/linuxppc-dev/20260327021403.214713-14-usama.arif@linux.dev/",
    "date": "2026-03-27T02:08:55",
    "name": "[v3,13/24] mm: proc: handle split_huge_pmd failure in pagemap_scan",
    "commit_ref": null,
    "pull_url": null,
    "state": "handled-elsewhere",
    "archived": false,
    "hash": "e81eb8ee33df52b7d3e176656747f00c6a4aba36",
    "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-14-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/2216646/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2216646/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <linuxppc-dev+bounces-18856-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=ffpxHw+P;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org\n (client-ip=2404:9400:21b9:f100::1; helo=lists.ozlabs.org;\n envelope-from=linuxppc-dev+bounces-18856-incoming=patchwork.ozlabs.org@lists.ozlabs.org;\n receiver=patchwork.ozlabs.org)",
            "lists.ozlabs.org;\n arc=none smtp.remote-ip=\"2001:41d0:1004:224b::b1\"",
            "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=ffpxHw+P;\n\tdkim-atps=neutral",
            "lists.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=linux.dev\n (client-ip=2001:41d0:1004:224b::b1; helo=out-177.mta0.migadu.com;\n envelope-from=usama.arif@linux.dev; receiver=lists.ozlabs.org)"
        ],
        "Received": [
            "from lists.ozlabs.org (lists.ozlabs.org\n [IPv6:2404:9400:21b9:f100::1])\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 4fhklb59yMz1y1j\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 27 Mar 2026 13:16:11 +1100 (AEDT)",
            "from boromir.ozlabs.org (localhost [127.0.0.1])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 4fhklD70Gjz2ypY;\n\tFri, 27 Mar 2026 13:15:52 +1100 (AEDT)",
            "from out-177.mta0.migadu.com (out-177.mta0.migadu.com\n [IPv6:2001:41d0:1004:224b::b1])\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 4fhklD1kPWz2xmX\n\tfor <linuxppc-dev@lists.ozlabs.org>; Fri, 27 Mar 2026 13:15:52 +1100 (AEDT)"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1774577752;\n\tcv=none;\n b=NzcfB4jYZJang3RD3ch0tWs/w9k5Wkpq1mRMOJshW9Ff9YSSWsZRZ5vGfwlOHGr3JiajfqMl0hykD3YcZFrddlBqoVHoMw2xdtCnYrCDrHYS9FV2BuxerDhx3GxHn7ThS+PnyCn82YEtxzxeNiwXEwpx4VYXiB8AhAk7zwd8KACCjtX5t1geK6QKqZpyBg8VDycx91kG9cqT9YyvWi3NKKVpc2I4hZdtQI2g4fYqxvrcHuxg/tfrKwJo56saA+tNEUICijRARvlEMkU9o+z2mUQz2raccwWwKuDvV/pQ9UyV3DuMZqHwQR5imtqZ8MZW0zO7xaRNxwZOzPg4PdAVjA==",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707;\n\tt=1774577752; c=relaxed/relaxed;\n\tbh=XO0R5fX+FiXnuLY0HoKuyc3BzHok+k+2YVFrwxlOH1U=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version:Content-Type;\n b=OpONDyesLe0PzVWAMRk2Vz9jdGh56dUgjQCZ9dLMtZldg5gebopAec6BC+KwroH06EJh1DmIHMiWH2QypfbGUuFOU1PrU3kDvMfdjgONfxGDYWYi2o/14vrTViXC6E0q9B1HHhsmXGuAmqR+BQTbVMgTB+L0uzUjFD9+0RPlHQNvgP6eswrixIhiHOmWDvR0DrEyMBn4EiUX77t7NIjXd1R0QJJrXGhESE11xtHzGinxjNTG9Y2g+HXgE06kbaN2VwiVvKzPNxEslJieaMZfCr0sI4NFjLUbLU7U1bzjucJIXSuDFwIjqMATe/bXeyaQEfEfBPHG/y6z/vcbjFDQPA==",
        "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=ffpxHw+P; dkim-atps=neutral;\n spf=pass (client-ip=2001:41d0:1004:224b::b1; helo=out-177.mta0.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=1774577733;\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=XO0R5fX+FiXnuLY0HoKuyc3BzHok+k+2YVFrwxlOH1U=;\n\tb=ffpxHw+PDquRIY7PsBB+gYIVU0HGhnrg/lszSQI4Ss/ylyOhYh/GY54SqX/Gjmz298GChe\n\tCK1RQEiqAUEGH9vhPBlSkxZYbNei6tVRaaPyX3jC8Yd6BbKN5MzHnqPEqfYrvEF6cG/SMn\n\tRA3uLKxe+69mdcNlUOoR18d3XTq3a4c=",
        "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 13/24] mm: proc: handle split_huge_pmd failure in pagemap_scan",
        "Date": "Thu, 26 Mar 2026 19:08:55 -0700",
        "Message-ID": "<20260327021403.214713-14-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.2 required=3.0 tests=DKIM_SIGNED,DKIM_VALID,\n\tDKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS autolearn=disabled\n\tversion=4.0.1 OzLabs 8",
        "X-Spam-Checker-Version": "SpamAssassin 4.0.1 (2024-03-25) on lists.ozlabs.org"
    },
    "content": "pagemap_scan_thp_entry() splits a huge PMD when the PAGEMAP_SCAN ioctl\nneeds to write-protect only a portion of a THP. It then returns -ENOENT\nso pagemap_scan_pmd_entry() falls through to PTE-level handling.\n\nCheck the split_huge_pmd() return value and propagate the error on\nfailure. Returning -ENOMEM instead of -ENOENT prevents the fallthrough\nto PTE handling, and the error propagates through walk_page_range() to\ndo_pagemap_scan() where it becomes the ioctl return value.\npagemap_scan_backout_range() already undoes the buffered output, and\nwalk_end is written back to userspace so the caller knows where the\nscan stopped.\n\nIf the split fails, the PMD remains huge. An alternative to the approach\nin the patch is to return -ENOENT, causing the caller to proceed to\npte_offset_map_lock(). ___pte_offset_map() detects the trans_huge PMD\nand returns NULL, which sets ACTION_AGAIN — restarting the walker on the\nsame PMD by which time the system might have enough memory to satisfy\nthe split from succeeding.\n\nSigned-off-by: Usama Arif <usama.arif@linux.dev>\n---\n fs/proc/task_mmu.c | 6 +++++-\n 1 file changed, 5 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c\nindex e091931d7ca19..f5f459140b5c0 100644\n--- a/fs/proc/task_mmu.c\n+++ b/fs/proc/task_mmu.c\n@@ -2714,9 +2714,13 @@ static int pagemap_scan_thp_entry(pmd_t *pmd, unsigned long start,\n \t * needs to be performed on a portion of the huge page.\n \t */\n \tif (end != start + HPAGE_SIZE) {\n+\t\tint err;\n+\n \t\tspin_unlock(ptl);\n-\t\tsplit_huge_pmd(vma, pmd, start);\n+\t\terr = split_huge_pmd(vma, pmd, start);\n \t\tpagemap_scan_backout_range(p, start, end);\n+\t\tif (err)\n+\t\t\treturn err;\n \t\t/* Report as if there was no THP */\n \t\treturn -ENOENT;\n \t}\n",
    "prefixes": [
        "v3",
        "13/24"
    ]
}