Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2215649/?format=api
{ "id": 2215649, "url": "http://patchwork.ozlabs.org/api/patches/2215649/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20260325010922.280141-1-marek.vasut+renesas@mailbox.org/", "project": { "id": 18, "url": "http://patchwork.ozlabs.org/api/projects/18/?format=api", "name": "U-Boot", "link_name": "uboot", "list_id": "u-boot.lists.denx.de", "list_email": "u-boot@lists.denx.de", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20260325010922.280141-1-marek.vasut+renesas@mailbox.org>", "list_archive_url": null, "date": "2026-03-25T01:09:05", "name": "net: rswitch: Avoid NULL pointer dereference during PHY access", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "1fb23a0ab391c9432ec7c9ddbbe36e08a056b8b0", "submitter": { "id": 85650, "url": "http://patchwork.ozlabs.org/api/people/85650/?format=api", "name": "Marek Vasut", "email": "marek.vasut+renesas@mailbox.org" }, "delegate": { "id": 157425, "url": "http://patchwork.ozlabs.org/api/users/157425/?format=api", "username": "jforissier", "first_name": "Jerome", "last_name": "Forissier", "email": "jerome.forissier@linaro.org" }, "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20260325010922.280141-1-marek.vasut+renesas@mailbox.org/mbox/", "series": [ { "id": 497365, "url": "http://patchwork.ozlabs.org/api/series/497365/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=497365", "date": "2026-03-25T01:09:05", "name": "net: rswitch: Avoid NULL pointer dereference during PHY access", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/497365/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2215649/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2215649/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<u-boot-bounces@lists.denx.de>", "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=mailbox.org header.i=@mailbox.org header.a=rsa-sha256\n header.s=mail20150812 header.b=jCnnUQSP;\n\tdkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org\n header.a=rsa-sha256 header.s=mail20150812 header.b=aRldd8QB;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de\n (client-ip=85.214.62.61; helo=phobos.denx.de;\n envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org)", "phobos.denx.de;\n dmarc=pass (p=reject dis=none) header.from=mailbox.org", "phobos.denx.de;\n spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de", "phobos.denx.de;\n\tdkim=pass (2048-bit key;\n secure) header.d=mailbox.org header.i=@mailbox.org header.b=\"jCnnUQSP\";\n\tdkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org\n header.b=\"aRldd8QB\";\n\tdkim-atps=neutral", "phobos.denx.de;\n dmarc=pass (p=reject dis=none) header.from=mailbox.org", "phobos.denx.de;\n spf=pass smtp.mailfrom=marek.vasut+renesas@mailbox.org", "outgoing_mbo_mout;\n dkim=pass header.d=mailbox.org header.s=mail20150812 header.b=aRldd8QB;\n spf=pass (outgoing_mbo_mout: domain of marek.vasut+renesas@mailbox.org\n designates 2001:67c:2050:b231:465::2 as permitted sender)\n smtp.mailfrom=marek.vasut+renesas@mailbox.org" ], "Received": [ "from phobos.denx.de (phobos.denx.de [85.214.62.61])\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 4fgTMl08Dzz1xy1\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 25 Mar 2026 12:09:38 +1100 (AEDT)", "from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id E73B383CD3;\n\tWed, 25 Mar 2026 02:09:34 +0100 (CET)", "by phobos.denx.de (Postfix, from userid 109)\n id 31C6B83CD3; Wed, 25 Mar 2026 02:09:33 +0100 (CET)", "from mout-p-102.mailbox.org (mout-p-102.mailbox.org [80.241.56.152])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))\n (No client certificate requested)\n by phobos.denx.de (Postfix) with ESMTPS id 78FB783A91\n for <u-boot@lists.denx.de>; Wed, 25 Mar 2026 02:09:29 +0100 (CET)", "from smtp2.mailbox.org (smtp2.mailbox.org\n [IPv6:2001:67c:2050:b231:465::2])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest\n SHA256)\n (No client certificate requested)\n by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4fgTMX4N7mz9vDG;\n Wed, 25 Mar 2026 02:09:28 +0100 (CET)" ], "X-Spam-Checker-Version": "SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de", "X-Spam-Level": "", "X-Spam-Status": "No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,\n DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED,\n RCVD_IN_MSPIKE_H2,RCVD_IN_VALIDITY_RPBL_BLOCKED,\n RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_PASS,SPF_PASS autolearn=ham\n autolearn_force=no version=3.4.2", "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org;\n s=mail20150812; t=1774400968;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:\n content-transfer-encoding:content-transfer-encoding;\n bh=Ry96jpLlnf2LzEdjvFw11j6m0haYa7qoAMKjiRiXoLU=;\n b=jCnnUQSP1mTl3T9Z8k+bbKDyWXU6XGUdX/iYX5sZyVszZVqfwq/+RJ28u8fVqVxSuMZrej\n rfWrfniNK81ZV2Pw5ojze5Ch3QsBxgfBoZFtj9gHnc8zjHiBseZejlBlhGlivgH4FLo+B5\n 1JeExv87w0Al48NI4huKKn9DmUIVb7PDFJlYSlHdqYaOEy8ypYrrgXVBpx7QPsOHH8rNff\n Vv0x3JXEaZg3HOvo02VKUoFKM+JUzeDz2vH+X9sDXyh8OkLMhaB4vqDjfWTnw7iUfXdtUt\n hi+lBn4atkrcMzkf1W9OvCJlKMK6OU1xyf5/nx4BQEUZ4cPIjnuybP01JEVDrg==", "v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org;\n s=mail20150812; t=1774400966;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:\n content-transfer-encoding:content-transfer-encoding;\n bh=Ry96jpLlnf2LzEdjvFw11j6m0haYa7qoAMKjiRiXoLU=;\n b=aRldd8QB6SgE3vdISnIitBkxYbuyFIXVvr7aN1Wu2AqNoB0TL8Tg9Rfa8L1i6VTXdTmvt/\n x4QAJoXEIrJBHJ6f8Zt1a4w97PdwICgerUNyPlZjE9ArZJWWz+NBcrBHnUsjthZZdI39OW\n mPdFYOKxHVbwSQIdgh3e3nlvz1R1RPzW75gh7cuHdhn0swwNDYISH8dsj1+CYI7nLeNbl3\n HT0ZV/2tl0qX+tCi6A7y7tIDXtS/kNc4YGZ59V5KY44X1Z6rfEIS5PEP0VODsGhk/NfpLH\n p8gnpreM5woZYz7gOqTW7Zu+FYhDHCvcaAZoJsGQ7k77WbysATaswuO2Mv5azA==" ], "From": "Marek Vasut <marek.vasut+renesas@mailbox.org>", "To": "u-boot@lists.denx.de", "Cc": "Marek Vasut <marek.vasut+renesas@mailbox.org>,\n Andrew Goodbody <andrew.goodbody@linaro.org>,\n Hai Pham <hai.pham.ud@renesas.com>,\n Jerome Forissier <jerome.forissier@arm.com>,\n Nobuhiro Iwamatsu <iwamatsu@nigauri.org>,\n Phong Hoang <phong.hoang.wz@renesas.com>,\n Tam Nguyen <tam.nguyen.xa@renesas.com>,\n Thanh Quan <thanh.quan.xn@renesas.com>, Tom Rini <trini@konsulko.com>", "Subject": "[PATCH] net: rswitch: Avoid NULL pointer dereference during PHY\n access", "Date": "Wed, 25 Mar 2026 02:09:05 +0100", "Message-ID": "<20260325010922.280141-1-marek.vasut+renesas@mailbox.org>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "X-MBO-RS-META": "j3g6e6j4wj4311r9frd8ufprdrt44fe6", "X-MBO-RS-ID": "873da63b10273129075", "X-Rspamd-Queue-Id": "4fgTMX4N7mz9vDG", "X-BeenThere": "u-boot@lists.denx.de", "X-Mailman-Version": "2.1.39", "Precedence": "list", "List-Id": "U-Boot discussion <u-boot.lists.denx.de>", "List-Unsubscribe": "<https://lists.denx.de/options/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=unsubscribe>", "List-Archive": "<https://lists.denx.de/pipermail/u-boot/>", "List-Post": "<mailto:u-boot@lists.denx.de>", "List-Help": "<mailto:u-boot-request@lists.denx.de?subject=help>", "List-Subscribe": "<https://lists.denx.de/listinfo/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=subscribe>", "Errors-To": "u-boot-bounces@lists.denx.de", "Sender": "\"U-Boot\" <u-boot-bounces@lists.denx.de>", "X-Virus-Scanned": "clamav-milter 0.103.8 at phobos.denx.de", "X-Virus-Status": "Clean" }, "content": "At the very early stage when PHY ID is being auto-detected, the\nPHY device is not yet instantiated and rswitch_etha .phydev is\nstill NULL. Add missing check for this condition and perform C22\nfallback access in this PHY ID auto-detection case.\n\nSigned-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>\n---\nCc: Andrew Goodbody <andrew.goodbody@linaro.org>\nCc: Hai Pham <hai.pham.ud@renesas.com>\nCc: Jerome Forissier <jerome.forissier@arm.com>\nCc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>\nCc: Phong Hoang <phong.hoang.wz@renesas.com>\nCc: Tam Nguyen <tam.nguyen.xa@renesas.com>\nCc: Thanh Quan <thanh.quan.xn@renesas.com>\nCc: Tom Rini <trini@konsulko.com>\nCc: u-boot@lists.denx.de\n---\n drivers/net/rswitch.c | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)", "diff": "diff --git a/drivers/net/rswitch.c b/drivers/net/rswitch.c\nindex 801c22bbdc7..c51908ed8f3 100644\n--- a/drivers/net/rswitch.c\n+++ b/drivers/net/rswitch.c\n@@ -482,7 +482,7 @@ static int rswitch_mii_read_c45(struct mii_dev *miidev, int phyad, int devad, in\n \t/* Access PHY register */\n \tif (devad != MDIO_DEVAD_NONE)\t/* Definitelly C45 */\n \t\tval = rswitch_mii_access_c45(etha_mii, true, phyad, devad, regad, 0);\n-\telse if (etha->phydev->is_c45)\t/* C22 access to C45 PHY */\n+\telse if (etha->phydev && etha->phydev->is_c45)\t/* C22 access to C45 PHY */\n \t\tval = rswitch_mii_access_c45(etha_mii, true, phyad, 1, regad, 0);\n \telse\n \t\tval = rswitch_mii_access_c22(etha_mii, true, phyad, regad, 0);\n@@ -516,7 +516,7 @@ int rswitch_mii_write_c45(struct mii_dev *miidev, int phyad, int devad, int rega\n \t/* Access PHY register */\n \tif (devad != MDIO_DEVAD_NONE)\t/* Definitelly C45 */\n \t\trswitch_mii_access_c45(etha_mii, false, phyad, devad, regad, data);\n-\telse if (etha->phydev->is_c45)\t/* C22 access to C45 PHY */\n+\telse if (etha->phydev && etha->phydev->is_c45)\t/* C22 access to C45 PHY */\n \t\trswitch_mii_access_c45(etha_mii, false, phyad, 1, regad, data);\n \telse\n \t\trswitch_mii_access_c22(etha_mii, false, phyad, regad, data);\n", "prefixes": [] }