get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2219926,
    "url": "http://patchwork.ozlabs.org/api/1.2/patches/2219926/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20260405125240.2558577-2-songmuchun@bytedance.com/",
    "project": {
        "id": 2,
        "url": "http://patchwork.ozlabs.org/api/1.2/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": "<20260405125240.2558577-2-songmuchun@bytedance.com>",
    "list_archive_url": "https://lore.kernel.org/linuxppc-dev/20260405125240.2558577-2-songmuchun@bytedance.com/",
    "date": "2026-04-05T12:51:52",
    "name": "[01/49] mm/sparse: fix vmemmap accounting imbalance on memory hotplug error",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "b51c5aa3a36b99a393f0ef261ff9f665bf571c4f",
    "submitter": {
        "id": 78930,
        "url": "http://patchwork.ozlabs.org/api/1.2/people/78930/?format=api",
        "name": "Muchun Song",
        "email": "songmuchun@bytedance.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20260405125240.2558577-2-songmuchun@bytedance.com/mbox/",
    "series": [
        {
            "id": 498783,
            "url": "http://patchwork.ozlabs.org/api/1.2/series/498783/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=498783",
            "date": "2026-04-05T12:51:51",
            "name": "mm: Generalize vmemmap optimization for DAX and HugeTLB",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/498783/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2219926/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2219926/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <linuxppc-dev+bounces-19331-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 (2048-bit key;\n unprotected) header.d=bytedance.com header.i=@bytedance.com\n header.a=rsa-sha256 header.s=google header.b=eK+EuRsY;\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-19331-incoming=patchwork.ozlabs.org@lists.ozlabs.org;\n receiver=patchwork.ozlabs.org)",
            "lists.ozlabs.org;\n arc=none smtp.remote-ip=\"2607:f8b0:4864:20::102f\"",
            "lists.ozlabs.org;\n dmarc=pass (p=quarantine dis=none) header.from=bytedance.com",
            "lists.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=bytedance.com header.i=@bytedance.com\n header.a=rsa-sha256 header.s=google header.b=eK+EuRsY;\n\tdkim-atps=neutral",
            "lists.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=bytedance.com\n (client-ip=2607:f8b0:4864:20::102f; helo=mail-pj1-x102f.google.com;\n envelope-from=songmuchun@bytedance.com; 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 4fpXSv3ZPqz1yCs\n\tfor <incoming@patchwork.ozlabs.org>; Sun, 05 Apr 2026 22:53:35 +1000 (AEST)",
            "from boromir.ozlabs.org (localhost [127.0.0.1])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 4fpXSq3Dd9z2ynv;\n\tSun, 05 Apr 2026 22:53:31 +1000 (AEST)",
            "from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com\n [IPv6:2607:f8b0:4864:20::102f])\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 4fpXSp32GPz2xMY\n\tfor <linuxppc-dev@lists.ozlabs.org>; Sun, 05 Apr 2026 22:53:30 +1000 (AEST)",
            "by mail-pj1-x102f.google.com with SMTP id\n 98e67ed59e1d1-3567e2b4159so2008874a91.0\n        for <linuxppc-dev@lists.ozlabs.org>;\n Sun, 05 Apr 2026 05:53:30 -0700 (PDT)",
            "from n232-176-004.byted.org ([36.110.163.97])\n        by smtp.gmail.com with ESMTPSA id\n 98e67ed59e1d1-35de66b4808sm3748505a91.2.2026.04.05.05.53.22\n        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n        Sun, 05 Apr 2026 05:53:27 -0700 (PDT)"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1775393611;\n\tcv=none;\n b=BlSkwAXhm00D+2uUAiQkEJZB0lBsILtzBr8qBU4DZEnzfaeS802CVc8YHNXEBJ9g5At1GaUwEb3DFyK7ohIPm/efOiizAPgx4NNbeImhlhua386akxEX4yQqxSkDrL+u/ufzCC7sh8b7aKnzRaOqMVwPz1fvXksQUiUnrVnIanqFoWZ2fmT0dRo3MYxrV2zzzuwt2nBRwnE6goKK2Uv306qGOiNQKyhLxFbZDzj4WjRN8VCHvibk+uTik1mT5em8vIt38As9NZxKNmij9FE8qCzABbvP18LNpKKD7BSh9tyOlsVHZ/z7bjQQRcYWD46C5dy68pbPaSyRl1eTBwv/wA==",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707;\n\tt=1775393611; c=relaxed/relaxed;\n\tbh=iSQZfRjRjpxozRWOnZuEHxRe4aXVCopNiKXhl9pDTQQ=;\n\th=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:\n\t MIME-Version;\n b=JYAyutbGp6Q3waEh4kjejUHL98zTTeznm4k7q1LJvYVP/xVUwbcVmXE5RZ0RUpuDpQWuRQQvHwQh8LywFBKCFQntIAzQ7Dw2eVX/nhX/7wSRa8ClHS1ygrbs8cDL+hmfFoTzv3XP9RpQKenUyTxNEWu7mTwBcgk29WWME4BsSxwKkzA/HuhxDATaUOsUyAMHwQ4JNFpEveBzc2WNzo7yQDC4Xn/U7MDv3pqvmL1f7U+tovwrr5Tk2YVQdi09IEITWoPadZfNgmqE1WqXZW22EPiqudJlgXgm3Du5mVEB4BBsg8jSFf4ajjgBNNWkpIG4RijnA3NSQGFqyd+R5wS1jg==",
        "ARC-Authentication-Results": "i=1; lists.ozlabs.org;\n dmarc=pass (p=quarantine dis=none) header.from=bytedance.com;\n dkim=pass (2048-bit key;\n unprotected) header.d=bytedance.com header.i=@bytedance.com\n header.a=rsa-sha256 header.s=google header.b=eK+EuRsY; dkim-atps=neutral;\n spf=pass (client-ip=2607:f8b0:4864:20::102f; helo=mail-pj1-x102f.google.com;\n envelope-from=songmuchun@bytedance.com;\n receiver=lists.ozlabs.org) smtp.mailfrom=bytedance.com",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=bytedance.com; s=google; t=1775393608; x=1775998408;\n darn=lists.ozlabs.org;\n        h=content-transfer-encoding:mime-version:references:in-reply-to\n         :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n         :message-id:reply-to;\n        bh=iSQZfRjRjpxozRWOnZuEHxRe4aXVCopNiKXhl9pDTQQ=;\n        b=eK+EuRsY9ICzA6AxkeDLcGBCfYPsuZtBXb1byPoxZSFjY04lYLVSszoy56ysFkZFsv\n         OKsQtP9fcXO62kK1oUKy9V5tcrayPruf0hG6QqIn1h4DnULtQKA5pEGpWs9O6eDuEJOh\n         YHecqdI6Yxcx+Ehe+V80WWh0odj2eNc+eC2E7zxE8377f0gM5Fy48vDfpI4MOez1d81R\n         MCb/TmLx2Q9mz+Z/qdWEPfn4Ai5xbhgJC/J8sek3pHAEBb0y1jyOmX3f212s9plr+rsg\n         MhdwOZT0T2rq0TPhl6cq2uqDrIr7qHq0fgiPUHFgEgeo0Kxr+RZXuLX/g15gWDOUo5dv\n         TyPQ==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20251104; t=1775393608; x=1775998408;\n        h=content-transfer-encoding:mime-version:references:in-reply-to\n         :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n         :to:cc:subject:date:message-id:reply-to;\n        bh=iSQZfRjRjpxozRWOnZuEHxRe4aXVCopNiKXhl9pDTQQ=;\n        b=D60bqhkQ8iVYcHx4ePIGZRpLhHi2htj4PwMFsRGGaCi5cWKPFF4GYeHCq+7tkFyXFF\n         4g/eVxjLPfRpBYnSy1xvD8wDi3SozQht2bw+MuIWb3IhTHyymYKdXAi39CKtw2N2X/Ck\n         l5MdeLbA4nUWj1u+ydSlziCd2vs+4dm0hkZHkWp0j2v9nBe82VAMVGmkmGWp6r4BizvX\n         zbl23dVqtJ11w0DVKzWwPj+p7q07HEMT5y8uQ7I07cXMHOGsoyVPjaGeevx4AxiHO1pk\n         2iKJIJtEgSetWscEveFC6buusw6IokQzyNQbU5pKfBTd9yFR8KYpBoBc5GGqwgKS80uO\n         OdqA==",
        "X-Forwarded-Encrypted": "i=1;\n AJvYcCV/F74+YlzfFlrKxLr1pOpZgXip4ZbPsB8kWkwlM7LBP9MbE0yOQ+1zSpbzRaee6HmAey6umN3KSQ2d0XU=@lists.ozlabs.org",
        "X-Gm-Message-State": "AOJu0Yz7PcO2+6N1/AtXGRasCT0jM+StFg27e+1iMs7Vps57KMxNujrg\n\thEEJDWMQicNZDA1vYLFbmcxqQd1lWz1xymcrCFsxwfC7uiLq5hOdXvOEEt+5UtqpENE=",
        "X-Gm-Gg": "AeBDietWJiF/zjfP+qt8GETovYHXwNl1oph0tWJf2WE70A55rRc8wJQQFcBK2ol5rOP\n\tVwxRGvnI3PAFSxWUc+CLwL8bROfXLoKau32nnwkr+qwjyaAIkFpIy3WsguP1FKHRXsvjCwJlqah\n\tlpChHIkKDV8v6ZyYup0SUwHsMAR8bOYHZXg6SZ3w4moF5c0SI8n5YtYyy60gTBtJLo26gZnl0gU\n\tfzIMVOxWXDWc/FIGh+NA3+174xf9GFTl66lJBxzed5bEZ3bbjqXSza10o5xvoAX8s5E9e39dcje\n\t1h4oyjFcpW0Tr4go4GTkhTA7pxwK9SMz0ro2Ut8earaOeXPBDU4c3YmN4QQkK8ZlwQp9idbD4OK\n\tTZBKu5YDVgX0aqvuO1Wp3sTtdDpILaf1TavDUEUF2u+abmsg8DdUWaNIn1obMYEOBew0pZ1/NfK\n\tYe3Ki+pLIbzhOWGwllyQxjMcuIn+Rx9n1mn7bM4brJWnw=",
        "X-Received": "by 2002:a17:90b:4c4b:b0:35d:93ff:2854 with SMTP id\n 98e67ed59e1d1-35de680e77fmr9867916a91.8.1775393608080;\n        Sun, 05 Apr 2026 05:53:28 -0700 (PDT)",
        "From": "Muchun Song <songmuchun@bytedance.com>",
        "To": "Andrew Morton <akpm@linux-foundation.org>,\n\tDavid Hildenbrand <david@kernel.org>,\n\tMuchun Song <muchun.song@linux.dev>,\n\tOscar Salvador <osalvador@suse.de>,\n\tMichael Ellerman <mpe@ellerman.id.au>,\n\tMadhavan Srinivasan <maddy@linux.ibm.com>",
        "Cc": "Lorenzo Stoakes <ljs@kernel.org>,\n\t\"Liam R . Howlett\" <Liam.Howlett@oracle.com>,\n\tVlastimil Babka <vbabka@kernel.org>,\n\tMike Rapoport <rppt@kernel.org>,\n\tSuren Baghdasaryan <surenb@google.com>,\n\tMichal Hocko <mhocko@suse.com>,\n\tNicholas Piggin <npiggin@gmail.com>,\n\tChristophe Leroy <chleroy@kernel.org>,\n\taneesh.kumar@linux.ibm.com,\n\tjoao.m.martins@oracle.com,\n\tlinux-mm@kvack.org,\n\tlinuxppc-dev@lists.ozlabs.org,\n\tlinux-kernel@vger.kernel.org,\n\tMuchun Song <songmuchun@bytedance.com>",
        "Subject": "[PATCH 01/49] mm/sparse: fix vmemmap accounting imbalance on memory\n hotplug error",
        "Date": "Sun,  5 Apr 2026 20:51:52 +0800",
        "Message-Id": "<20260405125240.2558577-2-songmuchun@bytedance.com>",
        "X-Mailer": "git-send-email 2.20.1",
        "In-Reply-To": "<20260405125240.2558577-1-songmuchun@bytedance.com>",
        "References": "<20260405125240.2558577-1-songmuchun@bytedance.com>",
        "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-Spam-Status": "No, score=-0.2 required=3.0 tests=DKIM_SIGNED,DKIM_VALID,\n\tDKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,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": "In section_activate(), if populate_section_memmap() fails, the error\nhandling path calls section_deactivate() to roll back the state. This\napproach introduces an accounting imbalance.\n\nSince the commit c3576889d87b (\"mm: fix accounting of memmap pages\"),\nmemmap pages are accounted for only after populate_section_memmap()\nsucceeds. However, section_deactivate() unconditionally decrements the\nvmemmap account. Consequently, a failure in populate_section_memmap()\nleads to a negative offset (underflow) in the system's vmemmap tracking.\n\nWe can fix this by ensuring that the vmemmap accounting is incremented\nimmediately before checking for the success of populate_section_memmap().\nIf populate_section_memmap() fails, the subsequent call to\nsection_deactivate() will decrement the accounting, perfectly offsetting\nthe increment and maintaining balance.\n\nFixes: c3576889d87b (\"mm: fix accounting of memmap pages\")\nSigned-off-by: Muchun Song <songmuchun@bytedance.com>\n---\n mm/sparse-vmemmap.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)",
    "diff": "diff --git a/mm/sparse-vmemmap.c b/mm/sparse-vmemmap.c\nindex 6eadb9d116e4..ee27d0c0efe2 100644\n--- a/mm/sparse-vmemmap.c\n+++ b/mm/sparse-vmemmap.c\n@@ -822,11 +822,11 @@ static struct page * __meminit section_activate(int nid, unsigned long pfn,\n \t\treturn pfn_to_page(pfn);\n \n \tmemmap = populate_section_memmap(pfn, nr_pages, nid, altmap, pgmap);\n+\tmemmap_pages_add(DIV_ROUND_UP(nr_pages * sizeof(struct page), PAGE_SIZE));\n \tif (!memmap) {\n \t\tsection_deactivate(pfn, nr_pages, altmap);\n \t\treturn ERR_PTR(-ENOMEM);\n \t}\n-\tmemmap_pages_add(DIV_ROUND_UP(nr_pages * sizeof(struct page), PAGE_SIZE));\n \n \treturn memmap;\n }\n",
    "prefixes": [
        "01/49"
    ]
}