get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2230048,
    "url": "http://patchwork.ozlabs.org/api/1.1/patches/2230048/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-um/patch/20260429060755.1541742-1-maninder1.s@samsung.com/",
    "project": {
        "id": 60,
        "url": "http://patchwork.ozlabs.org/api/1.1/projects/60/?format=api",
        "name": "User-mode Linux Development",
        "link_name": "linux-um",
        "list_id": "linux-um.lists.infradead.org",
        "list_email": "linux-um@lists.infradead.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": ""
    },
    "msgid": "<20260429060755.1541742-1-maninder1.s@samsung.com>",
    "date": "2026-04-29T06:07:55",
    "name": "[1/1] um: take reference of stack before using it in get_wchan",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "a234993f1487bb65390a770ce1eb8b14e45680d4",
    "submitter": {
        "id": 66082,
        "url": "http://patchwork.ozlabs.org/api/1.1/people/66082/?format=api",
        "name": "Maninder Singh",
        "email": "maninder1.s@samsung.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linux-um/patch/20260429060755.1541742-1-maninder1.s@samsung.com/mbox/",
    "series": [
        {
            "id": 501989,
            "url": "http://patchwork.ozlabs.org/api/1.1/series/501989/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linux-um/list/?series=501989",
            "date": "2026-04-29T06:07:55",
            "name": "[1/1] um: take reference of stack before using it in get_wchan",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/501989/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2230048/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2230048/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "\n <linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org>",
        "X-Original-To": "incoming@patchwork.ozlabs.org",
        "Delivered-To": "patchwork-incoming@legolas.ozlabs.org",
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n secure) header.d=lists.infradead.org header.i=@lists.infradead.org\n header.a=rsa-sha256 header.s=bombadil.20210309 header.b=pHhsk1CD;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=samsung.com header.i=@samsung.com header.a=rsa-sha256\n header.s=mail20170921 header.b=cLxHjRyZ;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=none (no SPF record) smtp.mailfrom=lists.infradead.org\n (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org;\n envelope-from=linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org;\n receiver=patchwork.ozlabs.org)"
        ],
        "Received": [
            "from bombadil.infradead.org (bombadil.infradead.org\n [IPv6:2607:7c80:54:3::133])\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 4g56LY1NQdz1xqf\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 29 Apr 2026 16:08:31 +1000 (AEST)",
            "from localhost ([::1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux))\n\tid 1wHy5y-00000002zZe-0YgZ;\n\tWed, 29 Apr 2026 06:08:26 +0000",
            "from [203.254.224.24] (helo=mailout1.samsung.com)\n\tby bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux))\n\tid 1wHy5q-00000002zYj-48yf\n\tfor linux-um@lists.infradead.org;\n\tWed, 29 Apr 2026 06:08:24 +0000",
            "from epcas5p3.samsung.com (unknown [182.195.41.41])\n\tby mailout1.samsung.com (KnoxPortal) with ESMTP id\n 20260429060811epoutp0181ebb005339358b0ee8593013c856de5~qvuSK8C8K2307123071epoutp015\n\tfor <linux-um@lists.infradead.org>; Wed, 29 Apr 2026 06:08:11 +0000 (GMT)",
            "from epsnrtp01.localdomain (unknown [182.195.42.153]) by\n\tepcas5p3.samsung.com (KnoxPortal) with ESMTPS id\n\t20260429060811epcas5p3eb8f4678c252b0aedc3649e851e24943~qvuRueMto0573905739epcas5p3b;\n\tWed, 29 Apr 2026 06:08:11 +0000 (GMT)",
            "from epcas5p4.samsung.com (unknown [182.195.41.42]) by\n\tepsnrtp01.localdomain (Postfix) with ESMTP id 4g56L31gM7z6B9mL; Wed, 29 Apr\n\t2026 06:08:11 +0000 (GMT)",
            "from epsmtip1.samsung.com (unknown [182.195.34.30]) by\n\tepcas5p4.samsung.com (KnoxPortal) with ESMTPA id\n\t20260429060811epcas5p443e048eaa98bba794300c801730978b7~qvuRku08Y2140021400epcas5p41;\n\tWed, 29 Apr 2026 06:08:11 +0000 (GMT)",
            "from localhost.localdomain (unknown [107.97.243.203]) by\n\tepsmtip1.samsung.com (KnoxPortal) with ESMTPA id\n\t20260429060809epsmtip1466fd91e973e52c790c62ea12bc9803a~qvuP6GRxT1378513785epsmtip1k;\n\tWed, 29 Apr 2026 06:08:09 +0000 (GMT)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help\n\t:List-Post:List-Archive:List-Unsubscribe:List-Id:References:Content-Type:\n\tContent-Transfer-Encoding:MIME-Version:Message-Id:Date:Subject:Cc:To:From:\n\tReply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender\n\t:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:List-Owner;\n\tbh=V4Ref7cckp8HVgY+nmNpxRpI7jAdARIWG9TLdwkFWnA=; b=pHhsk1CD2JKnTjLcdbYp20JFrK\n\tHyPLtOc82t9u52j49N3PauGFB/GWupkEXvgKLZHjMqXLuV7tbUnKO1AAho6u+dZe3aXARvYTCKfKc\n\tuW1/2IgB3Oo0hSCXQR0mhabHdoxKU6XuPQ8mrdzTvAZKIQyuNigDp25tjpGHhWdVwACam7FdjwgEF\n\tjLYt50HeE6lscp2csYqfrzs/VqwBwTtuCqJsz7r9SOD1BmNrftMFWDE+m2eNw5tqL5eMQaqy4wgaq\n\tp1UbmOVi6iulbGRs6EleYIh621McOz7WXzFhtYoyoXAmJiV4xDKD0PAVQ4PTpvFlRVH7gVqvdowVv\n\t+HMqdE3w==;",
            "v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com;\n\ts=mail20170921; t=1777442891;\n\tbh=V4Ref7cckp8HVgY+nmNpxRpI7jAdARIWG9TLdwkFWnA=;\n\th=From:To:Cc:Subject:Date:References:From;\n\tb=cLxHjRyZBU40tVq8YfTbAq8eWvMKBTfrCgq5lNiXRU18qi0YlASIzNXlhKWV1KMQc\n\t d+PDZBCyWMt91lbmpWfUWgIcsUf0lwkMXiBqkdN1cuc0Q1NRHYKHHKSLlseS0hLwXN\n\t t8awL4jru7P1/0A7TjqdsVt/EVtalonCfz9+DYM4="
        ],
        "DKIM-Filter": "OpenDKIM Filter v2.11.0 mailout1.samsung.com\n 20260429060811epoutp0181ebb005339358b0ee8593013c856de5~qvuSK8C8K2307123071epoutp015",
        "From": "Maninder Singh <maninder1.s@samsung.com>",
        "To": "richard@nod.at, anton.ivanov@cambridgegreys.com,\n\tjohannes@sipsolutions.net, tiwei.btw@antgroup.com, hehajime@gmail.com,\n\tbenjamin.berg@intel.com, geert@linux-m68k.org",
        "Cc": "linux-um@lists.infradead.org, linux-kernel@vger.kernel.org, Maninder\n\tSingh <maninder1.s@samsung.com>",
        "Subject": "[PATCH 1/1] um: take reference of stack before using it in\n get_wchan",
        "Date": "Wed, 29 Apr 2026 11:37:55 +0530",
        "Message-Id": "<20260429060755.1541742-1-maninder1.s@samsung.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-CMS-MailID": "20260429060811epcas5p443e048eaa98bba794300c801730978b7",
        "X-Msg-Generator": "CA",
        "Content-Type": "text/plain; charset=\"utf-8\"",
        "CMS-TYPE": "105P",
        "X-CMS-RootMailID": "20260429060811epcas5p443e048eaa98bba794300c801730978b7",
        "References": "\n <CGME20260429060811epcas5p443e048eaa98bba794300c801730978b7@epcas5p4.samsung.com>",
        "X-CRM114-Version": "20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ",
        "X-CRM114-CacheID": "sfid-20260428_230819_727275_9444F66E ",
        "X-CRM114-Status": "GOOD (  14.98  )",
        "X-Spam-Score": "-3.7 (---)",
        "X-Spam-Report": "Spam detection software,\n running on the system \"bombadil.infradead.org\",\n has NOT identified this incoming email as spam.  The original\n message has been attached to this so you can view it or label\n similar future email.  If you have any questions, see\n the administrator of that system for details.\n Content preview:  Stack of task can be freed earlier than task in case of\n THREAD_INFO_IN_TASK.\n    So separate reference of stack should be there. Help of\n THREAD_INFO_IN_TASK\n    config also suggests to take this reference before calling get_wchan.\n Content analysis details:   (-3.7 points, 5.0 required)\n  pts rule name              description\n ---- ----------------------\n --------------------------------------------------\n -2.3 RCVD_IN_DNSWL_MED      RBL: Sender listed at https://www.dnswl.org/,\n                             medium trust\n                             [203.254.224.24 listed in list.dnswl.org]\n  0.0 RCVD_IN_MSPIKE_H3      RBL: Good reputation (+3)\n                             [203.254.224.24 listed in wl.mailspike.net]\n -0.0 SPF_PASS               SPF: sender matches SPF record\n -0.0 SPF_HELO_PASS          SPF: HELO matches SPF record\n -0.1 DKIM_VALID_EF          Message has a valid DKIM or DK signature from\n                             envelope-from domain\n  0.1 DKIM_SIGNED            Message has a DKIM or DK signature,\n not necessarily valid\n -0.1 DKIM_VALID             Message has at least one valid DKIM or DK\n signature\n -0.1 DKIM_VALID_AU          Message has a valid DKIM or DK signature from\n author's\n                             domain\n  0.0 RCVD_IN_MSPIKE_WL      Mailspike good senders\n -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n                             [score: 0.0000]\n  0.8 RDNS_NONE              Delivered to internal network by a host with no\n rDNS\n -0.1 DKIMWL_WL_HIGH         DKIMwl.org - High trust sender",
        "X-BeenThere": "linux-um@lists.infradead.org",
        "X-Mailman-Version": "2.1.34",
        "Precedence": "list",
        "List-Id": "<linux-um.lists.infradead.org>",
        "List-Unsubscribe": "<http://lists.infradead.org/mailman/options/linux-um>,\n <mailto:linux-um-request@lists.infradead.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.infradead.org/pipermail/linux-um/>",
        "List-Post": "<mailto:linux-um@lists.infradead.org>",
        "List-Help": "<mailto:linux-um-request@lists.infradead.org?subject=help>",
        "List-Subscribe": "<http://lists.infradead.org/mailman/listinfo/linux-um>,\n <mailto:linux-um-request@lists.infradead.org?subject=subscribe>",
        "Sender": "\"linux-um\" <linux-um-bounces@lists.infradead.org>",
        "Errors-To": "linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org"
    },
    "content": "Stack of task can be freed earlier than task in case of\nTHREAD_INFO_IN_TASK. So separate reference of stack should be there.\n\nHelp of THREAD_INFO_IN_TASK config also suggests to take this\nreference before calling get_wchan.\n\nKASAN also reports it in case of manual race reproduction:\n[   18.400000] BUG: KASAN: vmalloc-out-of-bounds in __get_wchan+0x91/0xd9\n[   18.400000] Read of size 8 at addr 00000000648bfad0 by task cat/25\n..\n\nAdding try_get_task_stack() to make sure stack's sanity.\n\nFixes: 2f681ba4b352 (\"um: move thread info into task\")\nSigned-off-by: Maninder Singh <maninder1.s@samsung.com>\n---\n arch/um/kernel/process.c | 23 ++++++++++++++++++-----\n 1 file changed, 18 insertions(+), 5 deletions(-)",
    "diff": "diff --git a/arch/um/kernel/process.c b/arch/um/kernel/process.c\nindex 63b38a3f73f7..dfca9e0aeec9 100644\n--- a/arch/um/kernel/process.c\n+++ b/arch/um/kernel/process.c\n@@ -276,16 +276,12 @@ unsigned long arch_align_stack(unsigned long sp)\n }\n #endif\n \n-unsigned long __get_wchan(struct task_struct *p)\n+static unsigned long ___get_wchan(struct task_struct *p)\n {\n \tunsigned long stack_page, sp, ip;\n \tbool seen_sched = 0;\n \n \tstack_page = (unsigned long) task_stack_page(p);\n-\t/* Bail if the process has no kernel stack for some reason */\n-\tif (stack_page == 0)\n-\t\treturn 0;\n-\n \tsp = p->thread.switch_buf->JB_SP;\n \t/*\n \t * Bail if the stack pointer is below the bottom of the kernel\n@@ -306,4 +302,21 @@ unsigned long __get_wchan(struct task_struct *p)\n \t}\n \n \treturn 0;\n+\n+}\n+\n+unsigned long __get_wchan(struct task_struct *p)\n+{\n+\tunsigned long ret;\n+\n+\t/* Bail if the process has no kernel stack for some reason */\n+\tif (!try_get_task_stack(p))\n+\t\treturn 0;\n+\n+\tret = ___get_wchan(p);\n+\n+\tput_task_stack(p);\n+\n+\treturn ret;\n+\n }\n",
    "prefixes": [
        "1/1"
    ]
}