From: Imre Kaloz <kaloz@kernel.org>
To: Thomas Bogendoerfer <tsbogend@alpha.franken.de>, netdev@vger.kernel.org
Cc: Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org, Sashiko <sashiko-bot@kernel.org>
Subject: [PATCH net 1/2] net: sgi: ioc3-eth: set platform drvdata in probe
Date: Mon, 16 Nov 2026 11:19:33 +0100 [thread overview]
Message-ID: <20261116101934.25910-2-kaloz@kernel.org> (raw)
In-Reply-To: <20261116101934.25910-1-kaloz@kernel.org>
ioc3eth_remove() fetches the net_device with platform_get_drvdata(),
but probe never stores it, so unbinding the device oopses in
unregister_netdev().
Reproduced and tested on an SGI Fuel.
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Reported-by: Sashiko <sashiko-bot@kernel.org>
Closes: https://lore.kernel.org/all/179473760071.2199510.16065103101920438822@kernel.org/
Cc: stable@vger.kernel.org
Signed-off-by: Imre Kaloz <kaloz@kernel.org>
---
drivers/net/ethernet/sgi/ioc3-eth.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/sgi/ioc3-eth.c b/drivers/net/ethernet/sgi/ioc3-eth.c
index 009f37105eaf..ee284a4f75ff 100644
--- a/drivers/net/ethernet/sgi/ioc3-eth.c
+++ b/drivers/net/ethernet/sgi/ioc3-eth.c
@@ -848,6 +848,7 @@ static int ioc3eth_probe(struct platform_device *pdev)
return -ENOMEM;
SET_NETDEV_DEV(dev, &pdev->dev);
+ platform_set_drvdata(pdev, dev);
ip = netdev_priv(dev);
ip->dma_dev = pdev->dev.parent;
--
2.47.3
next prev parent reply other threads:[~2026-11-16 10:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-16 10:19 [PATCH net 0/2] net: sgi: ioc3-eth: two teardown fixes Imre Kaloz
2026-11-16 10:19 ` Imre Kaloz [this message]
2026-11-16 10:19 ` [PATCH net 2/2] net: sgi: ioc3-eth: fix IRQ lifetime against netdev teardown Imre Kaloz
2026-11-18 22:22 ` netdev-bot+sashiko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261116101934.25910-2-kaloz@kernel.org \
--to=kaloz@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sashiko-bot@kernel.org \
--cc=stable@vger.kernel.org \
--cc=tsbogend@alpha.franken.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.