Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2216638/?format=api
{ "id": 2216638, "url": "http://patchwork.ozlabs.org/api/patches/2216638/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20260327021403.214713-6-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-6-usama.arif@linux.dev>", "list_archive_url": "https://lore.kernel.org/linuxppc-dev/20260327021403.214713-6-usama.arif@linux.dev/", "date": "2026-03-27T02:08:47", "name": "[v3,05/24] mm: thp: handle split failure in zap_pmd_range()", "commit_ref": null, "pull_url": null, "state": "handled-elsewhere", "archived": false, "hash": "3d9befe89a6bf797d1ccfc715a9f4d1f6ae57023", "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-6-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/2216638/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2216638/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "\n <linuxppc-dev+bounces-18848-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=HOqb9c3q;\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-18848-incoming=patchwork.ozlabs.org@lists.ozlabs.org;\n receiver=patchwork.ozlabs.org)", "lists.ozlabs.org;\n arc=none smtp.remote-ip=95.215.58.186", "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=HOqb9c3q;\n\tdkim-atps=neutral", "lists.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=linux.dev\n (client-ip=95.215.58.186; helo=out-186.mta1.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 4fhkkT3r3Nz1y1j\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 27 Mar 2026 13:15:13 +1100 (AEDT)", "from boromir.ozlabs.org (localhost [127.0.0.1])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 4fhkkH2p4Fz2ygT;\n\tFri, 27 Mar 2026 13:15:03 +1100 (AEDT)", "from out-186.mta1.migadu.com (out-186.mta1.migadu.com\n [95.215.58.186])\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 4fhkkG27ytz2xR4\n\tfor <linuxppc-dev@lists.ozlabs.org>; Fri, 27 Mar 2026 13:15:02 +1100 (AEDT)" ], "ARC-Seal": "i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1774577703;\n\tcv=none;\n b=Wogb0kmwq2LhzcVfOp36rJRairvTucdsX+NZkbphIS2YuPCkFXats/+S5B9qWenjUATAFu7lkNUHLBE/KQEwPSEXVo+2iWTIWRXVssFcUjbRPzqZAPqaCasMRqTVh+ocJoSOewHRziVgo0kqn5wjt6N7x+qbsasfgACbflnvdoalRJlSZfKnsmrobDm+A+B/j/FgPABAyqRphVAa23ZWyVLTcytCz3jahfzlHTTUaJZhcbGWPeIjzDsVBFFBSyRgvQIEL+uDOdOwhtykj8vtsER30P7KVhqWa/u6OrSZ65VoSrcCPOP2ylyY1Hagdc864jafrRXYrnF8JQ5R7xgpug==", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707;\n\tt=1774577703; c=relaxed/relaxed;\n\tbh=sLE/jttxUNtNWJGXfdbfQ0fLOQxN3ImdDTn6kFnTkPI=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=dDRwPS/PlW1eVi0wv6wmj8yi3V7nAcBUxb9M+Sk+KEa4cbqGFkXrhDNMxSX/DqcXKc6SUApiCaiFAXkUKHjNz7UqDvZ1VwW7tc1zd5VIGGJyeJr0j8FQkG3jQsvOdZQeDkoxEX8oUDVonMIMhWh99McuesdJf7BEQREfpSaqRctqfHX9pgjav0zvtS+csbnbRvhyUfcdkCkBfDtdwBoXzCy9qlM03T3P+Fr52QKfV+B0OpdMwjf1pzkPgvw3Yf5SoIh2+blhcqpxCSoruhxmb3Jyt78SDhmMvh+k5CuvGltxs7HZ0tQD8Wt/740B51TtfF7e2b/JHJP1EGF9vWpoOg==", "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=HOqb9c3q; dkim-atps=neutral;\n spf=pass (client-ip=95.215.58.186; helo=out-186.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=1774577683;\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=sLE/jttxUNtNWJGXfdbfQ0fLOQxN3ImdDTn6kFnTkPI=;\n\tb=HOqb9c3qtURSYEfsDks7zbx2QDtDTH9l8hI6RIZbNZVZjMBH564Y3pW5ZPIcsI8NKoiThq\n\tEoKp0vqkwqrK6t8HL7D5u0ey61UVlkvaX3oR+haZEDWM9M+SC4Ti9llRE18ryT8ip3fCx4\n\tH6PgMQ7rNNkpgtUJP6NJzF9wyR2yris=", "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 05/24] mm: thp: handle split failure in zap_pmd_range()", "Date": "Thu, 26 Mar 2026 19:08:47 -0700", "Message-ID": "<20260327021403.214713-6-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": "zap_pmd_range() splits a huge PMD when the zap range doesn't cover the\nfull PMD (partial unmap). If the split fails, the PMD stays huge.\nFalling through to zap_pte_range() would dereference the huge PMD entry\nas a PTE page table pointer.\n\nSkip the range covered by the PMD on split failure instead.\n\nThe skip is safe across all call paths into zap_pmd_range():\n\n- exit_mmap() and OOM reaper: the zap range covers entire VMAs, so\n every PMD is fully covered (next - addr == HPAGE_PMD_SIZE). The\n zap_huge_pmd() branch handles these without splitting. The split\n failure path is unreachable.\n\n- munmap / mmap overlay: vma_adjust_trans_huge() (called from\n __split_vma) splits any PMD straddling the VMA boundary before the\n VMA is split. If that PMD split fails, __split_vma() returns\n -ENOMEM and the munmap is aborted before reaching zap_pmd_range().\n The split failure path is unreachable.\n\n- MADV_DONTNEED: advisory hint, the kernel is allowed to ignore it.\n The pages remain valid and accessible. A subsequent access returns\n existing data without faulting.\n\nSigned-off-by: Usama Arif <usama.arif@linux.dev>\n---\n mm/memory.c | 15 ++++++++++++---\n 1 file changed, 12 insertions(+), 3 deletions(-)", "diff": "diff --git a/mm/memory.c b/mm/memory.c\nindex e44469f9cf659..caf97c48cb166 100644\n--- a/mm/memory.c\n+++ b/mm/memory.c\n@@ -1985,9 +1985,18 @@ static inline unsigned long zap_pmd_range(struct mmu_gather *tlb,\n \tdo {\n \t\tnext = pmd_addr_end(addr, end);\n \t\tif (pmd_is_huge(*pmd)) {\n-\t\t\tif (next - addr != HPAGE_PMD_SIZE)\n-\t\t\t\t__split_huge_pmd(vma, pmd, addr, false);\n-\t\t\telse if (zap_huge_pmd(tlb, vma, pmd, addr)) {\n+\t\t\tif (next - addr != HPAGE_PMD_SIZE) {\n+\t\t\t\t/*\n+\t\t\t\t * If split fails, the PMD stays huge.\n+\t\t\t\t * Skip the range to avoid falling through\n+\t\t\t\t * to zap_pte_range, which would treat the\n+\t\t\t\t * huge PMD entry as a page table pointer.\n+\t\t\t\t */\n+\t\t\t\tif (__split_huge_pmd(vma, pmd, addr, false)) {\n+\t\t\t\t\taddr = next;\n+\t\t\t\t\tcontinue;\n+\t\t\t\t}\n+\t\t\t} else if (zap_huge_pmd(tlb, vma, pmd, addr)) {\n \t\t\t\taddr = next;\n \t\t\t\tcontinue;\n \t\t\t}\n", "prefixes": [ "v3", "05/24" ] }