get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2219835,
    "url": "http://patchwork.ozlabs.org/api/patches/2219835/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/ltp/patch/20260404171614.1695371-1-pavrampu@linux.ibm.com/",
    "project": {
        "id": 59,
        "url": "http://patchwork.ozlabs.org/api/projects/59/?format=api",
        "name": "Linux Test Project development",
        "link_name": "ltp",
        "list_id": "ltp.lists.linux.it",
        "list_email": "ltp@lists.linux.it",
        "web_url": "",
        "scm_url": "",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20260404171614.1695371-1-pavrampu@linux.ibm.com>",
    "list_archive_url": null,
    "date": "2026-04-04T17:16:14",
    "name": "hugemmap35: Migrating libhugetlbfs test v6 truncate_reserve_wraparound.c",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "813204947a6e06b96a5a0cf7fd7156e80d236aad",
    "submitter": {
        "id": 91766,
        "url": "http://patchwork.ozlabs.org/api/people/91766/?format=api",
        "name": "Pavithra",
        "email": "pavrampu@linux.ibm.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/ltp/patch/20260404171614.1695371-1-pavrampu@linux.ibm.com/mbox/",
    "series": [
        {
            "id": 498742,
            "url": "http://patchwork.ozlabs.org/api/series/498742/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/ltp/list/?series=498742",
            "date": "2026-04-04T17:16:14",
            "name": "hugemmap35: Migrating libhugetlbfs test v6 truncate_reserve_wraparound.c",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/498742/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2219835/comments/",
    "check": "warning",
    "checks": "http://patchwork.ozlabs.org/api/patches/2219835/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "ltp@lists.linux.it"
        ],
        "Delivered-To": [
            "patchwork-incoming@legolas.ozlabs.org",
            "ltp@picard.linux.it"
        ],
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256\n header.s=pp1 header.b=Ta98Ri+E;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it\n (client-ip=2001:1418:10:5::2; helo=picard.linux.it;\n envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it;\n receiver=patchwork.ozlabs.org)"
        ],
        "Received": [
            "from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fp2Ln2frCz1yG2\n\tfor <incoming@patchwork.ozlabs.org>; Sun, 05 Apr 2026 03:16:33 +1000 (AEST)",
            "from picard.linux.it (localhost [IPv6:::1])\n\tby picard.linux.it (Postfix) with ESMTP id B8BE83E29F2\n\tfor <incoming@patchwork.ozlabs.org>; Sat,  4 Apr 2026 19:16:30 +0200 (CEST)",
            "from in-3.smtp.seeweb.it (in-3.smtp.seeweb.it [217.194.8.3])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n (No client certificate requested)\n by picard.linux.it (Postfix) with ESMTPS id 876F33E1C3E\n for <ltp@lists.linux.it>; Sat,  4 Apr 2026 19:16:27 +0200 (CEST)",
            "from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com\n [148.163.156.1])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n (No client certificate requested)\n by in-3.smtp.seeweb.it (Postfix) with ESMTPS id 9FAB81A00783\n for <ltp@lists.linux.it>; Sat,  4 Apr 2026 19:16:25 +0200 (CEST)",
            "from pps.filterd (m0360083.ppops.net [127.0.0.1])\n by mx0a-001b2d01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id\n 634EOcWM425055; Sat, 4 Apr 2026 17:16:23 GMT",
            "from ppma12.dal12v.mail.ibm.com\n (dc.9e.1632.ip4.static.sl-reverse.com [50.22.158.220])\n by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 4dat51shp4-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);\n Sat, 04 Apr 2026 17:16:23 +0000 (GMT)",
            "from pps.filterd (ppma12.dal12v.mail.ibm.com [127.0.0.1])\n by ppma12.dal12v.mail.ibm.com (8.18.1.2/8.18.1.2) with ESMTP id\n 634EpZkN021722;\n Sat, 4 Apr 2026 17:16:22 GMT",
            "from smtprelay04.fra02v.mail.ibm.com ([9.218.2.228])\n by ppma12.dal12v.mail.ibm.com (PPS) with ESMTPS id 4d6sat24wc-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);\n Sat, 04 Apr 2026 17:16:22 +0000",
            "from smtpav06.fra02v.mail.ibm.com (smtpav06.fra02v.mail.ibm.com\n [10.20.54.105])\n by smtprelay04.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id\n 634HGIdt14745994\n (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);\n Sat, 4 Apr 2026 17:16:18 GMT",
            "from smtpav06.fra02v.mail.ibm.com (unknown [127.0.0.1])\n by IMSVA (Postfix) with ESMTP id CD50320049;\n Sat,  4 Apr 2026 17:16:18 +0000 (GMT)",
            "from smtpav06.fra02v.mail.ibm.com (unknown [127.0.0.1])\n by IMSVA (Postfix) with ESMTP id 9275620040;\n Sat,  4 Apr 2026 17:16:17 +0000 (GMT)",
            "from li-49acbccc-2994-11b2-a85c-d51b89e344f1.ibm.com.com (unknown\n [9.39.20.67]) by smtpav06.fra02v.mail.ibm.com (Postfix) with ESMTP;\n Sat,  4 Apr 2026 17:16:17 +0000 (GMT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc\n :content-transfer-encoding:date:from:message-id:mime-version\n :subject:to; s=pp1; bh=N+BLjWZbKYjlw+F1u96ixTypglDY652VN/BBiTrhH\n Sc=; b=Ta98Ri+EKN+Vu1DTjM3KmVqX9B/nhkK5o5qfslhPaLH9QEPD+RuOT/KdV\n hty4DA06R77HmLUMsxiFcYxJfGLwCCrKI0SEeA3vZCA5YjInjeDiMLdKAg0Ogsg5\n q3994iR5Fk5iquHAp9SJd6nSslkz/46bFUY/PNAqj4vrhkwkz7rL5PdcGb6FJk8a\n U+mzdHmnPiNFAfbuwFSotA7lUw+uWBZ78otCj1GR/bPIB6xeuIhMrK9cQh1LaPgo\n kxgCrFlBK7/nv+mEuhBlODy/ftoKTdxfxQ0L8g4tYwt7qRWIrckuT0zhcZFjyUtB\n II6OlPA+M+Sb7y2nAM5gQfBKzPG4w==",
        "From": "Pavithra <pavrampu@linux.ibm.com>",
        "To": "ltp@lists.linux.it",
        "Date": "Sat,  4 Apr 2026 22:46:14 +0530",
        "Message-ID": "<20260404171614.1695371-1-pavrampu@linux.ibm.com>",
        "X-Mailer": "git-send-email 2.53.0",
        "MIME-Version": "1.0",
        "X-TM-AS-GCONF": "00",
        "X-Authority-Analysis": "v=2.4 cv=J6anLQnS c=1 sm=1 tr=0 ts=69d14767 cx=c_pps\n a=bLidbwmWQ0KltjZqbj+ezA==:117 a=bLidbwmWQ0KltjZqbj+ezA==:17\n a=A5OVakUREuEA:10 a=VkNPw1HP01LnGYTKEx00:22 a=RnoormkPH1_aCDwRdu11:22\n a=iQ6ETzBq9ecOQQE5vZCe:22 a=mPJGfP9KAAAA:20 a=VnNF1IyMAAAA:8\n a=MZnfsXp6x2x5Sfp_G2oA:9 a=bA3UWDv6hWIuX7UZL3qL:22",
        "X-Proofpoint-GUID": "yBKWZpk11HW3iV5ztVier39nh6TwZXwH",
        "X-Proofpoint-ORIG-GUID": "yBKWZpk11HW3iV5ztVier39nh6TwZXwH",
        "X-Proofpoint-Spam-Details-Enc": "AW1haW4tMjYwNDA0MDE1OCBTYWx0ZWRfX88LPJ+OxqDcp\n oHVUsV04s6+2i/02y6kh1bon5HSVRRzJNe4bZuP/D3ZxoEr2KDSzhus9Ha+ubURUUVI9GQe7Ylj\n 0TEdZhD3luqtWmirr66J613AUQIn7OKM89ngY89BtMPKYr/IsaUjwE3z8fss0Ttc424pjVWDx5Q\n S7EN9jKfc83l+6UAqioGpO1ADhdw5wDyOWXaLWJR7SN3I39fblGa5RcZ2XvGcXSnUUBGX5rwZmt\n eqB289xHtgvLJZsjhhvt4LbBKyEeL1a4Diy+cJFQnPKKErlDHoCaz59u098/GnZepisCow4H3Nc\n NlMuqJEcc//nnwI0+LuGO22oo/YdFfTYtuFDXaNBh/89E4h+B+R6hLTB2P+QA9FfGLX575WsVoR\n Lg/+YgZEbff0lgP3o6eLmq6IadhhKzxxH6vQI0r4WYIV9/8aCbW3VwmRpqfHFEdT+irvdPWFie/\n qEkyBvs9mQlGKEPN27g==",
        "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49\n definitions=2026-04-04_02,2026-04-03_01,2025-10-01_01",
        "X-Proofpoint-Spam-Details": "rule=outbound_notspam policy=outbound score=0\n spamscore=0 lowpriorityscore=0 bulkscore=0 priorityscore=1501 clxscore=1015\n impostorscore=0 phishscore=0 malwarescore=0 suspectscore=0 adultscore=0\n classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0\n reason=mlx scancount=1 engine=8.22.0-2603050001 definitions=main-2604040158",
        "X-Spam-Status": "No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID,\n SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=disabled version=4.0.1",
        "X-Spam-Checker-Version": "SpamAssassin 4.0.1 (2024-03-25) on in-3.smtp.seeweb.it",
        "X-Virus-Scanned": "clamav-milter 1.0.9 at in-3.smtp.seeweb.it",
        "X-Virus-Status": "Clean",
        "Subject": "[LTP] [PATCH] hugemmap35: Migrating libhugetlbfs test v6\n truncate_reserve_wraparound.c",
        "X-BeenThere": "ltp@lists.linux.it",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "Linux Test Project <ltp.lists.linux.it>",
        "List-Unsubscribe": "<https://lists.linux.it/options/ltp>,\n <mailto:ltp-request@lists.linux.it?subject=unsubscribe>",
        "List-Archive": "<http://lists.linux.it/pipermail/ltp/>",
        "List-Post": "<mailto:ltp@lists.linux.it>",
        "List-Help": "<mailto:ltp-request@lists.linux.it?subject=help>",
        "List-Subscribe": "<https://lists.linux.it/listinfo/ltp>,\n <mailto:ltp-request@lists.linux.it?subject=subscribe>",
        "Cc": "pavrampu@linux.ibm.com",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Errors-To": "ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it",
        "Sender": "\"ltp\" <ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it>"
    },
    "content": "This test verifies that the kernel correctly maintains hugepage reservation\naccounting when truncating a hugetlbfs file. It ensures that reserved\nhugepages are properly tracked through the complete lifecycle\n\nSigned-off-by: Pavithra <pavrampu@linux.ibm.com>\n---\n runtest/hugetlb                               |   1 +\n testcases/kernel/mem/.gitignore               |   1 +\n .../kernel/mem/hugetlb/hugemmap/hugemmap35.c  | 124 ++++++++++++++++++\n 3 files changed, 126 insertions(+)\n create mode 100644 testcases/kernel/mem/hugetlb/hugemmap/hugemmap35.c",
    "diff": "diff --git a/runtest/hugetlb b/runtest/hugetlb\nindex 0896d3c94..8ee0e6f82 100644\n--- a/runtest/hugetlb\n+++ b/runtest/hugetlb\n@@ -36,6 +36,7 @@ hugemmap30 hugemmap30\n hugemmap31 hugemmap31\n hugemmap32 hugemmap32\n hugemmap34 hugemmap34\n+hugemmap35 hugemmap35\n hugemmap05_1 hugemmap05 -m\n hugemmap05_2 hugemmap05 -s\n hugemmap05_3 hugemmap05 -s -m\ndiff --git a/testcases/kernel/mem/.gitignore b/testcases/kernel/mem/.gitignore\nindex b4455de51..0e59035df 100644\n--- a/testcases/kernel/mem/.gitignore\n+++ b/testcases/kernel/mem/.gitignore\n@@ -36,6 +36,7 @@\n /hugetlb/hugemmap/hugemmap31\n /hugetlb/hugemmap/hugemmap32\n /hugetlb/hugemmap/hugemmap34\n+/hugetlb/hugemmap/hugemmap35\n /hugetlb/hugeshmat/hugeshmat01\n /hugetlb/hugeshmat/hugeshmat02\n /hugetlb/hugeshmat/hugeshmat03\ndiff --git a/testcases/kernel/mem/hugetlb/hugemmap/hugemmap35.c b/testcases/kernel/mem/hugetlb/hugemmap/hugemmap35.c\nnew file mode 100644\nindex 000000000..4b46bdbaa\n--- /dev/null\n+++ b/testcases/kernel/mem/hugetlb/hugemmap/hugemmap35.c\n@@ -0,0 +1,124 @@\n+// SPDX-License-Identifier: LGPL-2.1-or-later\n+/*\n+ * Copyright (C) 2005-2006 David Gibson & Adam Litke, IBM Corporation.\n+ * Copyright (c) 2026 Pavithra <pavrampu@linux.ibm.com>\n+ */\n+\n+/*\n+ * Origin: https://github.com/libhugetlbfs/libhugetlbfs/blob/master/tests/truncate_reserve_wraparound.c\n+ *\n+ * Test that hugepage reservation accounting is correctly maintained when\n+ * truncating a hugetlbfs file. This verifies that reserved hugepages are\n+ * properly tracked through the sequence of: mmap (reserves page), touch\n+ * (instantiates page), truncate (releases page), and attempted access\n+ * (triggers SIGBUS). A bug in i_size handling could cause the reservation\n+ * count to become incorrect, leading to resource leaks or allocation failures.\n+ */\n+\n+#include <signal.h>\n+#include <setjmp.h>\n+#include \"hugetlb.h\"\n+\n+#define MNTPOINT \"hugetlbfs/\"\n+\n+static long hpage_size;\n+static int fd = -1;\n+\n+static sigjmp_buf sig_escape;\n+\n+static void sigbus_handler(int signum LTP_ATTRIBUTE_UNUSED)\n+{\n+\tsiglongjmp(sig_escape, 17);\n+}\n+\n+static void run_test(void)\n+{\n+\tvolatile int sigbus_count = 0;\n+\tunsigned long initial_rsvd, after_map_rsvd, after_touch_rsvd;\n+\tunsigned long after_trunc_rsvd, after_unmap_rsvd, after_sigbus_rsvd;\n+\tvolatile unsigned int *q;\n+\tvoid *p;\n+\n+\tinitial_rsvd = SAFE_READ_MEMINFO(MEMINFO_HPAGE_RSVD);\n+\ttst_res(TINFO, \"Reserve count before map: %lu\", initial_rsvd);\n+\n+\tp = SAFE_MMAP(NULL, hpage_size, PROT_READ|PROT_WRITE, MAP_SHARED,\n+\t\t\tfd, 0);\n+\tq = p;\n+\n+\tafter_map_rsvd = SAFE_READ_MEMINFO(MEMINFO_HPAGE_RSVD);\n+\n+\tTST_EXP_EQ_LU(initial_rsvd + 1, after_map_rsvd);\n+\tif (!TST_PASS)\n+\t\tgoto windup;\n+\n+\t*q = 0;\n+\tafter_touch_rsvd = SAFE_READ_MEMINFO(MEMINFO_HPAGE_RSVD);\n+\n+\tTST_EXP_EQ_LU(initial_rsvd, after_touch_rsvd);\n+\tif (!TST_PASS)\n+\t\tgoto windup;\n+\n+\tSAFE_FTRUNCATE(fd, 0);\n+\tafter_trunc_rsvd = SAFE_READ_MEMINFO(MEMINFO_HPAGE_RSVD);\n+\n+\tTST_EXP_EQ_LU(initial_rsvd, after_trunc_rsvd);\n+\tif (!TST_PASS)\n+\t\tgoto windup;\n+\n+\tif (sigsetjmp(sig_escape, 1) == 0)\n+\t\t*q; /* Fault, triggering a SIGBUS */\n+\telse\n+\t\tsigbus_count++;\n+\n+\tif (sigbus_count != 1) {\n+\t\ttst_res(TFAIL, \"Didn't SIGBUS after truncate\");\n+\t\tgoto windup;\n+\t}\n+\n+\tafter_sigbus_rsvd = SAFE_READ_MEMINFO(MEMINFO_HPAGE_RSVD);\n+\n+\tTST_EXP_EQ_LU(initial_rsvd, after_sigbus_rsvd);\n+\tif (!TST_PASS)\n+\t\tgoto windup;\n+\n+windup:\n+\tSAFE_MUNMAP(p, hpage_size);\n+\tafter_unmap_rsvd = SAFE_READ_MEMINFO(MEMINFO_HPAGE_RSVD);\n+\n+\tTST_EXP_EQ_LU(initial_rsvd, after_unmap_rsvd);\n+}\n+\n+static void setup(void)\n+{\n+\n+\thpage_size = tst_get_hugepage_size();\n+\tfd = tst_creat_unlinked(MNTPOINT, 0, 0600);\n+\n+\tstruct sigaction sa = {\n+\t\t.sa_handler = sigbus_handler,\n+\t\t.sa_flags = 0,\n+\t};\n+\n+\tSAFE_SIGACTION(SIGBUS, &sa, NULL);\n+}\n+\n+static void cleanup(void)\n+{\n+\tif (fd != -1)\n+\t\tSAFE_CLOSE(fd);\n+}\n+\n+static struct tst_test test = {\n+\t.tags = (struct tst_tag[]) {\n+\t\t{\"linux-git\", \"ebed4bfc8da8\"},\n+\t\t{}\n+\t},\n+\t.needs_root = 1,\n+\t.mntpoint = MNTPOINT,\n+\t.needs_hugetlbfs = 1,\n+\t.hugepages = {4, TST_NEEDS},\n+\t.setup = setup,\n+\t.cleanup = cleanup,\n+\t.test_all = run_test,\n+};\n",
    "prefixes": []
}