get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2216644,
    "url": "http://patchwork.ozlabs.org/api/patches/2216644/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20260327021403.214713-12-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-12-usama.arif@linux.dev>",
    "list_archive_url": "https://lore.kernel.org/linuxppc-dev/20260327021403.214713-12-usama.arif@linux.dev/",
    "date": "2026-03-27T02:08:53",
    "name": "[v3,11/24] mm: thp: handle split failure in userfaultfd move_pages()",
    "commit_ref": null,
    "pull_url": null,
    "state": "handled-elsewhere",
    "archived": false,
    "hash": "bfe4dc5c4c0612ea6dcfb467882777cec8781283",
    "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-12-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/2216644/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2216644/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <linuxppc-dev+bounces-18854-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=ZIxjF05t;\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-18854-incoming=patchwork.ozlabs.org@lists.ozlabs.org;\n receiver=patchwork.ozlabs.org)",
            "lists.ozlabs.org;\n arc=none smtp.remote-ip=95.215.58.179",
            "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=ZIxjF05t;\n\tdkim-atps=neutral",
            "lists.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=linux.dev\n (client-ip=95.215.58.179; helo=out-179.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 4fhklK1cmtz1y1j\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 27 Mar 2026 13:15:57 +1100 (AEDT)",
            "from boromir.ozlabs.org (localhost [127.0.0.1])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 4fhkl336lrz2ynH;\n\tFri, 27 Mar 2026 13:15:43 +1100 (AEDT)",
            "from out-179.mta1.migadu.com (out-179.mta1.migadu.com\n [95.215.58.179])\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 4fhkl23DBDz2yjV\n\tfor <linuxppc-dev@lists.ozlabs.org>; Fri, 27 Mar 2026 13:15:42 +1100 (AEDT)"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1774577743;\n\tcv=none;\n b=PcDQCtpm0Q4gbVwwPbh29F5n2znFoEpgEkt9Hpl3y/80yMGrdJv6C7knYQbKAWiMR6+/S0eC3J8y3fwXeVDmUIwH4qTyFUP0tP/14Iv4/RLoEW4zVsjItQE3ehjXEGaDQKsaHAlg6IplLoDX6VuNzrogmrGdfTcaQn/1SAZ/B7sLVq7+xDhTgRoMmp3ISyPJvM6opuzYTIwu5+HlYLjLYXXo8D6LLtoBOLB/I7mcEPbKRP5/MB4LXhwxIFvlFx2gb8TjH7v8vOrmOK6jX62v+yu2jNKAsLMNDY82fxjPYx0u5XLmCAGMarLCXSXMmKwtNmxfoEdj7k4+xZinq1nWvA==",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707;\n\tt=1774577743; c=relaxed/relaxed;\n\tbh=MnIHRq/fqfQAry7CsjH3C0Gk1Kzxzc2ZoqIQPSTrMd8=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=QEq45Q6vXicHfMOPwB0HY4J3YKmkELwNez1xkqz41WlpNiBcaov1kZ+NPs22yEocTqKxwsHEs8lKFC6s2XmiPnIwaDsqS2eyCfQ1idYkSwTcIjWZM9PP2fnCOfYWGy3JCAr0AchW4Ya9TrDhvm7JsKzpclIPF5YylhgFIZ/vqUWzGxKniEnH+GHQbMa7bfSLmaEHNBc0UqCGYI8SW1sonDuvuWIaUiqqKt7pve6NU+yIUgVimhIuX50AjxFalqch3+WEOtBGWKwx9Lz/fShwuIFtLF20R2Ffx2/lm88i+SkPDWRYAJChtKXQljwvYJ/CKF7jfwesTVIuYyeVe7nzwQ==",
        "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=ZIxjF05t; dkim-atps=neutral;\n spf=pass (client-ip=95.215.58.179; helo=out-179.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=1774577723;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\t to:to:cc:cc:mime-version:mime-version:\n\t content-transfer-encoding:content-transfer-encoding:\n\t in-reply-to:in-reply-to:references:references;\n\tbh=MnIHRq/fqfQAry7CsjH3C0Gk1Kzxzc2ZoqIQPSTrMd8=;\n\tb=ZIxjF05tNow9dzUHFs4hqWlnAIWjdc/ZiKkgAVcRdwnfvfmpyyBGO5uiLBm/6z5QMsmkqr\n\tztEHZPBtu0iiXBGTFC271TxvM49AQMco70eXk+ARnt2wNg+T9bIFsUICK9N4z8qczvq+p2\n\tor1an7NL4GSoQ5bKiLd41MfIKi+EWcU=",
        "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 11/24] mm: thp: handle split failure in userfaultfd move_pages()",
        "Date": "Thu, 26 Mar 2026 19:08:53 -0700",
        "Message-ID": "<20260327021403.214713-12-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-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": "The UFFDIO_MOVE ioctl's move_pages() loop splits a huge PMD when the\nfolio is pinned and can't be moved at PMD granularity.\n\nIf the split fails, the PMD stays huge and move_pages_pte() can't\nprocess individual pages. Break out of the loop on split failure\nand return -ENOMEM to the caller. This is similar to how other\nallocation failures (__pte_alloc, mm_alloc_pmd) are handled in\nmove_pages().\n\nSigned-off-by: Usama Arif <usama.arif@linux.dev>\n---\n mm/userfaultfd.c | 8 +++++++-\n 1 file changed, 7 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/mm/userfaultfd.c b/mm/userfaultfd.c\nindex 481ec7eb44420..a04d62dd1e065 100644\n--- a/mm/userfaultfd.c\n+++ b/mm/userfaultfd.c\n@@ -1946,7 +1946,13 @@ ssize_t move_pages(struct userfaultfd_ctx *ctx, unsigned long dst_start,\n \t\t\t\t}\n \n \t\t\t\tspin_unlock(ptl);\n-\t\t\t\tsplit_huge_pmd(src_vma, src_pmd, src_addr);\n+\t\t\t\t/*\n+\t\t\t\t * If split fails, the PMD stays huge and\n+\t\t\t\t * move_pages_pte can't process it.\n+\t\t\t\t */\n+\t\t\t\terr = split_huge_pmd(src_vma, src_pmd, src_addr);\n+\t\t\t\tif (err)\n+\t\t\t\t\tbreak;\n \t\t\t\t/* The folio will be split by move_pages_pte() */\n \t\t\t\tcontinue;\n \t\t\t}\n",
    "prefixes": [
        "v3",
        "11/24"
    ]
}