Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.1/patches/2227981/?format=api
{ "id": 2227981, "url": "http://patchwork.ozlabs.org/api/1.1/patches/2227981/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20260424160259.2672722-3-johan@kernel.org/", "project": { "id": 2, "url": "http://patchwork.ozlabs.org/api/1.1/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/" }, "msgid": "<20260424160259.2672722-3-johan@kernel.org>", "date": "2026-04-24T16:02:58", "name": "[v2,2/3] powerpc/pseries: switch to dynamic ibmebus root device", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "e47ac852953e85df94562e8d735f8ec03057e166", "submitter": { "id": 64666, "url": "http://patchwork.ozlabs.org/api/1.1/people/64666/?format=api", "name": "Johan Hovold", "email": "johan@kernel.org" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20260424160259.2672722-3-johan@kernel.org/mbox/", "series": [ { "id": 501391, "url": "http://patchwork.ozlabs.org/api/1.1/series/501391/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=501391", "date": "2026-04-24T16:02:57", "name": "powerpc: switch to dynamic root devices", "version": 2, "mbox": "http://patchwork.ozlabs.org/series/501391/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2227981/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2227981/checks/", "tags": {}, "headers": { "Return-Path": "\n <linuxppc-dev+bounces-20087-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=kernel.org header.i=@kernel.org header.a=rsa-sha256\n header.s=k20201202 header.b=hEBhmvJT;\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-20087-incoming=patchwork.ozlabs.org@lists.ozlabs.org;\n receiver=patchwork.ozlabs.org)", "lists.ozlabs.org;\n arc=none smtp.remote-ip=\"2600:3c04:e001:324:0:1991:8:25\"", "lists.ozlabs.org;\n dmarc=pass (p=quarantine dis=none) header.from=kernel.org", "lists.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256\n header.s=k20201202 header.b=hEBhmvJT;\n\tdkim-atps=neutral", "lists.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org\n (client-ip=2600:3c04:e001:324:0:1991:8:25; helo=tor.source.kernel.org;\n envelope-from=johan@kernel.org; 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 4g2Hnx6PtTz1yDD\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 25 Apr 2026 02:04:05 +1000 (AEST)", "from boromir.ozlabs.org (localhost [127.0.0.1])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 4g2Hnn1y15z2yqW;\n\tSat, 25 Apr 2026 02:03:57 +1000 (AEST)", "from tor.source.kernel.org (tor.source.kernel.org\n [IPv6:2600:3c04:e001:324:0:1991:8:25])\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 4g2Hnl3gZDz2yYs\n\tfor <linuxppc-dev@lists.ozlabs.org>; Sat, 25 Apr 2026 02:03:55 +1000 (AEST)", "from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58])\n\tby tor.source.kernel.org (Postfix) with ESMTP id 4D8E260125;\n\tFri, 24 Apr 2026 16:03:52 +0000 (UTC)", "by smtp.kernel.org (Postfix) with ESMTPSA id F0621C2BCB6;\n\tFri, 24 Apr 2026 16:03:51 +0000 (UTC)", "from johan by xi.lan with local (Exim 4.98.2)\n\t(envelope-from <johan@kernel.org>)\n\tid 1wGJ0P-0000000BDJf-3JTr;\n\tFri, 24 Apr 2026 18:03:49 +0200" ], "ARC-Seal": "i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1777046636;\n\tcv=none;\n b=GZoQRuZ1FwdEaURvu44xj1y2pw0qypZg6/AkY/mYJ7f7Ba2sTDZHlfEDnm4O9MaaiHlcJqWnijyN8AT/akjNrQLnGnTwEweXWjDTz1sPP3igeOixCqddioybAq6+uvb9YN60XEGyHuI9wqldWjp1bOgkJ3YpOcxMCpGjPMoKf1tVIHf7W9E7lcrouXkZJfdj+LZvqi3Y6qvRiSxk5UBaZCm1ChbxOfqG0eAbDvY/952Qm4QHgJOzfs3jCnQO4Lz/VW2jra34eP/NGqlUyZP+jMfYz5eJTd6AE9KGiMDIIF7T5OjOCq794nAwlzs80N2YGOtfrV/8R3GW9xCNNJidfQ==", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707;\n\tt=1777046636; c=relaxed/relaxed;\n\tbh=vWSKtBFAQzmEEefMgNM3SuXrWODGB109gf614QLUmiU=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=Njybm/ep1kQo42V1iDij3Pw93VG8l4bLnxbK4fWaqLK4o0fmjABUEQKRMiWqMhlR+igYM7MZnOB2Xhyea+q3Eo0oO8BrNFWYEyU7h29Viuyo/yu5oCw4DLNc1ktdlvYJ+2+MqDfClIEIBhCPN+B5NaPWhlmBBvasY6elKhsRAqSussz+28j3yhAoQIFVzMXMxa2PuII9WdPNv0OF2Sk8vwyetCigOrztmcDqTyci3EmWZ0oKaYYhSXPD4Weo8dHYArCG03VaxpxfJDLrki0EEg4KkaNbaTCFpCI9s37ZEKfS2Panii80qy9jztuXkv8L9X5fKs/7ANZ8eUtwBBPqxA==", "ARC-Authentication-Results": "i=1; lists.ozlabs.org;\n dmarc=pass (p=quarantine dis=none) header.from=kernel.org;\n dkim=pass (2048-bit key;\n unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256\n header.s=k20201202 header.b=hEBhmvJT; dkim-atps=neutral;\n spf=pass (client-ip=2600:3c04:e001:324:0:1991:8:25;\n helo=tor.source.kernel.org; envelope-from=johan@kernel.org;\n receiver=lists.ozlabs.org) smtp.mailfrom=kernel.org", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;\n\ts=k20201202; t=1777046632;\n\tbh=HgtVi8OJ+/vIrStnMhO7W57bp79LE5Df42vhHHfdxpc=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=hEBhmvJTHXvQyJNp44YCnJZdKEP4UG5PFKRk75M19GsVhhMcH5E4nrHgVOPb+qeYD\n\t fzYCaz14564Tkrulxn2oOzAEYVzviqEDq7VkaTKGdh8tY5OFhps/ybTui0rPuqMFV2\n\t fBCyWBDQU7SlJfJSADfgYHrtlQemdwnjq6FRePMVT7hakj4KqgPGI7Nz2qXFJYHk6Z\n\t FC4VKzDpsPiLPFhwUxLy3Ji4OFXIqJOaAbsboz+Vq/P7RZu+uqxRWr0/OVq7J4xDRi\n\t WBn2F7wFm9Se5/81BzPHPN+JBjpmxuyuiooRyAn61DFsAffY+8LqPiafGXxaQdKSrV\n\t Fbca3UoWcgPIw==", "From": "Johan Hovold <johan@kernel.org>", "To": "Geoff Levand <geoff@infradead.org>,\n\tMadhavan Srinivasan <maddy@linux.ibm.com>,\n\tMichael Ellerman <mpe@ellerman.id.au>", "Cc": "Nicholas Piggin <npiggin@gmail.com>,\n\tChristophe Leroy <chleroy@kernel.org>,\n\tGreg Kroah-Hartman <gregkh@linuxfoundation.org>,\n\tlinuxppc-dev@lists.ozlabs.org,\n\tlinux-kernel@vger.kernel.org,\n\tJohan Hovold <johan@kernel.org>", "Subject": "[PATCH v2 2/3] powerpc/pseries: switch to dynamic ibmebus root device", "Date": "Fri, 24 Apr 2026 18:02:58 +0200", "Message-ID": "<20260424160259.2672722-3-johan@kernel.org>", "X-Mailer": "git-send-email 2.53.0", "In-Reply-To": "<20260424160259.2672722-1-johan@kernel.org>", "References": "<20260424160259.2672722-1-johan@kernel.org>", "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=DKIMWL_WL_HIGH,DKIM_SIGNED,\n\tDKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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": "Driver core expects devices to be dynamically allocated and will, for\nexample, complain loudly if a device that lacks a release function is\never freed.\n\nUse root_device_register() to allocate and register the root device\ninstead of open coding using a static device.\n\nAlso add the missing sanity check when registering ibmebus devices to\navoid use-after-free if the bus failed to register (which would\npreviously have triggered a bunch of use-after-free warnings).\n\nSigned-off-by: Johan Hovold <johan@kernel.org>\n---\n arch/powerpc/platforms/pseries/ibmebus.c | 39 ++++++++++++++----------\n 1 file changed, 23 insertions(+), 16 deletions(-)", "diff": "diff --git a/arch/powerpc/platforms/pseries/ibmebus.c b/arch/powerpc/platforms/pseries/ibmebus.c\nindex cad2deb7e70d..f2064e0b975d 100644\n--- a/arch/powerpc/platforms/pseries/ibmebus.c\n+++ b/arch/powerpc/platforms/pseries/ibmebus.c\n@@ -51,9 +51,7 @@\n #include <asm/ibmebus.h>\n #include <asm/machdep.h>\n \n-static struct device ibmebus_bus_device = { /* fake \"parent\" device */\n-\t.init_name = \"ibmebus\",\n-};\n+static struct device *ibmebus_bus_device;\t/* fake \"parent\" device */\n \n const struct bus_type ibmebus_bus_type;\n \n@@ -171,7 +169,10 @@ static int ibmebus_create_device(struct device_node *dn)\n \tstruct platform_device *dev;\n \tint ret;\n \n-\tdev = of_device_alloc(dn, NULL, &ibmebus_bus_device);\n+\tif (!ibmebus_bus_device)\n+\t\treturn -ENOENT;\n+\n+\tdev = of_device_alloc(dn, NULL, ibmebus_bus_device);\n \tif (!dev)\n \t\treturn -ENOMEM;\n \n@@ -447,6 +448,7 @@ EXPORT_SYMBOL(ibmebus_bus_type);\n \n static int __init ibmebus_bus_init(void)\n {\n+\tstruct device *root;\n \tint err;\n \n \tprintk(KERN_INFO \"IBM eBus Device Driver\\n\");\n@@ -458,23 +460,28 @@ static int __init ibmebus_bus_init(void)\n \t\treturn err;\n \t}\n \n-\terr = device_register(&ibmebus_bus_device);\n-\tif (err) {\n-\t\tprintk(KERN_WARNING \"%s: device_register returned %i\\n\",\n+\troot = root_device_register(\"ibmebus\");\n+\tif (IS_ERR(root)) {\n+\t\terr = PTR_ERR(root);\n+\t\tprintk(KERN_WARNING \"%s: root_device_register returned %i\\n\",\n \t\t __func__, err);\n-\t\tput_device(&ibmebus_bus_device);\n-\t\tbus_unregister(&ibmebus_bus_type);\n-\n-\t\treturn err;\n+\t\tgoto err_deregister_bus;\n \t}\n \n+\tibmebus_bus_device = root;\n+\n \terr = ibmebus_create_devices(ibmebus_matches);\n-\tif (err) {\n-\t\tdevice_unregister(&ibmebus_bus_device);\n-\t\tbus_unregister(&ibmebus_bus_type);\n-\t\treturn err;\n-\t}\n+\tif (err)\n+\t\tgoto err_deregister_root;\n \n \treturn 0;\n+\n+err_deregister_root:\n+\tibmebus_bus_device = NULL;\n+\troot_device_unregister(root);\n+err_deregister_bus:\n+\tbus_unregister(&ibmebus_bus_type);\n+\n+\treturn err;\n }\n machine_postcore_initcall(pseries, ibmebus_bus_init);\n", "prefixes": [ "v2", "2/3" ] }