get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2231659,
    "url": "http://patchwork.ozlabs.org/api/patches/2231659/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/e4ed435c44fc191f2eb23c7907ba6f72f193e6aa.1777606826.git.ritesh.list@gmail.com/",
    "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": "<e4ed435c44fc191f2eb23c7907ba6f72f193e6aa.1777606826.git.ritesh.list@gmail.com>",
    "list_archive_url": "https://lore.kernel.org/linuxppc-dev/e4ed435c44fc191f2eb23c7907ba6f72f193e6aa.1777606826.git.ritesh.list@gmail.com/",
    "date": "2026-05-01T04:11:40",
    "name": "[v3,1/9] pseries/papr-hvpipe: Fix race with interrupt handler",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "a49a2b25deb64bdcab5e8e2e06691b8762d503e2",
    "submitter": {
        "id": 79126,
        "url": "http://patchwork.ozlabs.org/api/people/79126/?format=api",
        "name": "Ritesh Harjani (IBM)",
        "email": "ritesh.list@gmail.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/e4ed435c44fc191f2eb23c7907ba6f72f193e6aa.1777606826.git.ritesh.list@gmail.com/mbox/",
    "series": [
        {
            "id": 502420,
            "url": "http://patchwork.ozlabs.org/api/series/502420/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=502420",
            "date": "2026-05-01T04:11:39",
            "name": "pseries/papr-hvpipe: Fix deadlock, races and misc cleanups",
            "version": 3,
            "mbox": "http://patchwork.ozlabs.org/series/502420/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2231659/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2231659/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <linuxppc-dev+bounces-20352-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=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=QnZ0cfXQ;\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-20352-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::433\"",
            "lists.ozlabs.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com",
            "lists.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=QnZ0cfXQ;\n\tdkim-atps=neutral",
            "lists.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com\n (client-ip=2607:f8b0:4864:20::433; helo=mail-pf1-x433.google.com;\n envelope-from=ritesh.list@gmail.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 server-signature ECDSA (secp384r1 raw public key)\n server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g6Hgf1q6Jz1y04\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 01 May 2026 14:12:30 +1000 (AEST)",
            "from boromir.ozlabs.org (localhost [127.0.0.1])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 4g6HgW4jRMz30Gf;\n\tFri, 01 May 2026 14:12:23 +1000 (AEST)",
            "from mail-pf1-x433.google.com (mail-pf1-x433.google.com\n [IPv6:2607:f8b0:4864:20::433])\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 4g6HgV4wZPz2xjd\n\tfor <linuxppc-dev@lists.ozlabs.org>; Fri, 01 May 2026 14:12:22 +1000 (AEST)",
            "by mail-pf1-x433.google.com with SMTP id\n d2e1a72fcca58-827270d50d4so1556303b3a.3\n        for <linuxppc-dev@lists.ozlabs.org>;\n Thu, 30 Apr 2026 21:12:22 -0700 (PDT)",
            "from localhost.localdomain ([49.205.216.49])\n        by smtp.gmail.com with ESMTPSA id\n d2e1a72fcca58-83515b485eesm1159428b3a.48.2026.04.30.21.12.15\n        (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256);\n        Thu, 30 Apr 2026 21:12:18 -0700 (PDT)"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1777608743;\n\tcv=none;\n b=LWasbTgW2DvsAcAk47T6zTE8ielXhk7TcfB/xgi10l5kNRg8o0OzBNWscmvrSxZkcDuwPjzJVpIKA7Cb8VPh7mRiNkchUXqw8JNsb8IQbLpNXOQq7kY8ajfE/NrLDePCaGPXQ4Oa7jSxsssMv//6LRfpm/fWk3xScXtugdDX2sWXVR2ZcDedI3UgfNHDEL1tChrah5m6WoWE67cdCq3Sgrc7VwbLU7vWgLCMxN8qByOHqspzX7EtV9azL54A1PXPwXxSL4tQmtjm330bl/OYewz1R+qH/s4VQxMg8wt46u2LFNwOrJJcJnhvx25gdCgYwm7CWV4NwB5tdkAzPvFYYg==",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707;\n\tt=1777608743; c=relaxed/relaxed;\n\tbh=PYNm6J9AhUQ6HT8V6B6W7Iuh7E+aasxrExqJ2exyz7U=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=Nj3hWqy3QXCDJjhLi+JNHRCp0JhCeIJbOPKGpJmQXHgL/NHCIeVqXZy2Z+V20/ChRVE8WuTu483VkA0EVza5fFZXstLmtIr40nE1fIo8Wk17j6uHYA8mTFOl5wPFEyephHVbi48AIO3TxE6Q7BB5j7yabf7bFpsEjjie8cT7aERV7Uk5oAc2w0yS2kY6EE/Xti+MoPI6e5KRHqDK95LgTZlVjI9GPmLTnZA7O5L1fwSMBLwC2tzlk9vWmhE54UgeEv5vsewXKh6JBk2rrsN1KgLiP9bpaK7IaKQFMEPLSmAP+VM/RqCSVBAS0EIB3R75WBIownxsjyjsMJrB1lM6bQ==",
        "ARC-Authentication-Results": "i=1; lists.ozlabs.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com; dkim=pass (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=QnZ0cfXQ; dkim-atps=neutral;\n spf=pass (client-ip=2607:f8b0:4864:20::433; helo=mail-pf1-x433.google.com;\n envelope-from=ritesh.list@gmail.com;\n receiver=lists.ozlabs.org) smtp.mailfrom=gmail.com",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=gmail.com; s=20251104; t=1777608740; x=1778213540;\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=PYNm6J9AhUQ6HT8V6B6W7Iuh7E+aasxrExqJ2exyz7U=;\n        b=QnZ0cfXQROWTsIa5+R2sbkf3E3W0evbLs7p+cMSM2MMLHstlquKXWxVzk7EshL9d5r\n         SQy6N8ymYrPOagbir8GsHnGYrARTBlF4h+GtnurxaNs5RcyOq0s5+OIwYKX4gbjIe/ew\n         /ZEir/A4u1HxUw7SXUgV8tegoLFAr4eUxbCN6Fh0+v9m24+Mpv7HrBS7S/CxFYWR2u4/\n         lJ2URJ0Y3/k1jK79seAPOXjZ9fWthigR3L04ISh7EwX5JxFrCnVd/ESbKL5VBX6NAvh8\n         WkUgfTYKJGaliIdPjG5FbMcoxtXxJhWssfLmvKQK4ANRaSQ1D/BzSK1+WQeXbTVRJaSI\n         Cx3w==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20251104; t=1777608740; x=1778213540;\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=PYNm6J9AhUQ6HT8V6B6W7Iuh7E+aasxrExqJ2exyz7U=;\n        b=f/HoJ02/vnXqyxD/LLK5qWx9894FNAUGZ7vzFBDxPNHHwrBazR8mQ6ZiNHIW4Nt/oM\n         0FhOFGUQ+ZJ6NEJPLIux09+tlx/LL6hO7UCB17ISsvz/qY1E2inAbNJ2ggky43vTgr+r\n         Hujf1p4fXNc5NvYGb7d+odyJcyDXwPoJadvXdPfPX87gYpTcfqDmBS2vN9zP1pCvywCs\n         ga1oZoSehkJ/4HYa2q/eSzc6HuMkVrMnIxx6+gFLkmQTyAiftp+G7AH4gqoL6EKCgv1N\n         BooaP8m8FUFYwXVHrGUlVPsSLZf4kn9KkpnboTKUzvxfeUjnPzPlmFw22jUH2tV6ePFr\n         tKXA==",
        "X-Gm-Message-State": "AOJu0Yz4mS7l4er2ZxtKQB05y6L8rAqVRdOgsZ2vS17klokVIRySSBaK\n\tg0gdETM3+Z4WF0dId77gA2oW7IZPm8TWt9SNk10UVG2JiqQf1rLlYfjcP3ZLOb5z",
        "X-Gm-Gg": "AeBDiet4l7tzmWoNfnQxwJ1MWgjm6+nlfEau6vOvJ+dlDs6iKn8d1ieIZY8UtFM9KbL\n\tL8V20+fG2+WeRlos4JL8/7vDA/Trt4Mol3uqDvvkY2gcqofGgRyWFJDsJEuKD4t1h6XB8UU+Ue0\n\toCXwFoiQn2pI3vgc+L3aaxE1+oGHhd5vL6HASXYHwXMz+a8fCu/WaLb6UTZUHgj5/MFVjai+tuU\n\tnpEVwl5N+WDil8umJy6nzCkF/PsY4x41iaEkvS+zT9tdh/aAnUpByjwonq5cAGjX0vfAw+yc74f\n\t/mrL793kLQ/YjiWTSouMxj7YmHmJKHlpaWH9RUs6l1DGJ64wTX+VL8z7AvGmJLTSUZa2O4SObsE\n\tlzmbL0k4qHSCdfbJmy+nZHHET15ve+oSaEQdxQonN/iLM4qJwJzyl+4f+a4f1Jy/rKlWK1H9BsG\n\tFw+JxwnE4XSzdF3xdhgknGwYezowq3M69Ev8QsyPmQEcO/VGVqPZ2oMhCcrHKy7TU=",
        "X-Received": "by 2002:a05:6a00:1c9e:b0:824:adf4:5a2f with SMTP id\n d2e1a72fcca58-834fdc5c2admr6357028b3a.43.1777608739583;\n        Thu, 30 Apr 2026 21:12:19 -0700 (PDT)",
        "From": "\"Ritesh Harjani (IBM)\" <ritesh.list@gmail.com>",
        "To": "linuxppc-dev@lists.ozlabs.org,\n\tHaren Myneni <haren@linux.ibm.com>",
        "Cc": "Madhavan Srinivasan <maddy@linux.ibm.com>,\n\tChristophe Leroy <chleroy@kernel.org>,\n\tVenkat Rao Bagalkote <venkat88@linux.ibm.com>,\n\tNicholas Piggin <npiggin@gmail.com>,\n\tlinux-kernel@vger.kernel.org,\n\t\"Ritesh Harjani (IBM)\" <ritesh.list@gmail.com>,\n\tstable@vger.kernel.org",
        "Subject": "[PATCH v3 1/9] pseries/papr-hvpipe: Fix race with interrupt handler",
        "Date": "Fri,  1 May 2026 09:41:40 +0530",
        "Message-ID": "\n <e4ed435c44fc191f2eb23c7907ba6f72f193e6aa.1777606826.git.ritesh.list@gmail.com>",
        "X-Mailer": "git-send-email 2.50.1",
        "In-Reply-To": "<cover.1777606826.git.ritesh.list@gmail.com>",
        "References": "<cover.1777606826.git.ritesh.list@gmail.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,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,\n\tSPF_HELO_NONE,SPF_PASS autolearn=disabled version=4.0.1 OzLabs 8",
        "X-Spam-Checker-Version": "SpamAssassin 4.0.1 (2024-03-25) on lists.ozlabs.org"
    },
    "content": "While executing ->ioctl handler or ->release handler, if an interrupt\nfires on the same cpu, then we can enter into a deadlock.\n\nThis patch fixes both these handlers to take spin_lock_irq{save|restore}\nversions of the lock to prevent this deadlock.\n\nCc: stable@vger.kernel.org\nFixes: 814ef095f12c9 (\"powerpc/pseries: Add papr-hvpipe char driver for HVPIPE interfaces\")\nSigned-off-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com>\n---\n arch/powerpc/platforms/pseries/papr-hvpipe.c | 20 +++++++++++---------\n 1 file changed, 11 insertions(+), 9 deletions(-)",
    "diff": "diff --git a/arch/powerpc/platforms/pseries/papr-hvpipe.c b/arch/powerpc/platforms/pseries/papr-hvpipe.c\nindex 14ae480d060a..c41d45e1986d 100644\n--- a/arch/powerpc/platforms/pseries/papr-hvpipe.c\n+++ b/arch/powerpc/platforms/pseries/papr-hvpipe.c\n@@ -444,13 +444,14 @@ static int papr_hvpipe_handle_release(struct inode *inode,\n \t\t\t\tstruct file *file)\n {\n \tstruct hvpipe_source_info *src_info;\n+\tunsigned long flags;\n \n \t/*\n \t * Hold the lock, remove source from src_list, reset the\n \t * hvpipe status and release the lock to prevent any race\n \t * with message event IRQ.\n \t */\n-\tspin_lock(&hvpipe_src_list_lock);\n+\tspin_lock_irqsave(&hvpipe_src_list_lock, flags);\n \tsrc_info = file->private_data;\n \tlist_del(&src_info->list);\n \tfile->private_data = NULL;\n@@ -461,10 +462,10 @@ static int papr_hvpipe_handle_release(struct inode *inode,\n \t */\n \tif (src_info->hvpipe_status & HVPIPE_MSG_AVAILABLE) {\n \t\tsrc_info->hvpipe_status = 0;\n-\t\tspin_unlock(&hvpipe_src_list_lock);\n+\t\tspin_unlock_irqrestore(&hvpipe_src_list_lock, flags);\n \t\thvpipe_rtas_recv_msg(NULL, 0);\n \t} else\n-\t\tspin_unlock(&hvpipe_src_list_lock);\n+\t\tspin_unlock_irqrestore(&hvpipe_src_list_lock, flags);\n \n \tkfree(src_info);\n \treturn 0;\n@@ -480,20 +481,21 @@ static const struct file_operations papr_hvpipe_handle_ops = {\n static int papr_hvpipe_dev_create_handle(u32 srcID)\n {\n \tstruct hvpipe_source_info *src_info __free(kfree) = NULL;\n+\tunsigned long flags;\n \n-\tspin_lock(&hvpipe_src_list_lock);\n+\tspin_lock_irqsave(&hvpipe_src_list_lock, flags);\n \t/*\n \t * Do not allow more than one process communicates with\n \t * each source.\n \t */\n \tsrc_info = hvpipe_find_source(srcID);\n \tif (src_info) {\n-\t\tspin_unlock(&hvpipe_src_list_lock);\n+\t\tspin_unlock_irqrestore(&hvpipe_src_list_lock, flags);\n \t\tpr_err(\"pid(%d) is already using the source(%d)\\n\",\n \t\t\t\tsrc_info->tsk->pid, srcID);\n \t\treturn -EALREADY;\n \t}\n-\tspin_unlock(&hvpipe_src_list_lock);\n+\tspin_unlock_irqrestore(&hvpipe_src_list_lock, flags);\n \n \tsrc_info = kzalloc_obj(*src_info, GFP_KERNEL_ACCOUNT);\n \tif (!src_info)\n@@ -510,18 +512,18 @@ static int papr_hvpipe_dev_create_handle(u32 srcID)\n \t\treturn fdf.err;\n \n \tretain_and_null_ptr(src_info);\n-\tspin_lock(&hvpipe_src_list_lock);\n+\tspin_lock_irqsave(&hvpipe_src_list_lock, flags);\n \t/*\n \t * If two processes are executing ioctl() for the same\n \t * source ID concurrently, prevent the second process to\n \t * acquire FD.\n \t */\n \tif (hvpipe_find_source(srcID)) {\n-\t\tspin_unlock(&hvpipe_src_list_lock);\n+\t\tspin_unlock_irqrestore(&hvpipe_src_list_lock, flags);\n \t\treturn -EALREADY;\n \t}\n \tlist_add(&src_info->list, &hvpipe_src_list);\n-\tspin_unlock(&hvpipe_src_list_lock);\n+\tspin_unlock_irqrestore(&hvpipe_src_list_lock, flags);\n \treturn fd_publish(fdf);\n }\n \n",
    "prefixes": [
        "v3",
        "1/9"
    ]
}