mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH 2/2] fixup! net: register eth class
Date: Thu, 20 Jun 2024 14:55:48 +0200	[thread overview]
Message-ID: <20240620125548.464201-2-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20240620125548.464201-1-a.fatoum@pengutronix.de>

net: fix crash removing uninitiailized eth_device::list during shutdown

next currently crashes on barebox_shutdown(), because list is no longer
initialized after being replaced by classes.

Fixes: 27ed36df29b1 ("net: register eth class")
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 include/net.h | 2 --
 net/eth.c     | 1 -
 2 files changed, 3 deletions(-)

diff --git a/include/net.h b/include/net.h
index 05d73e543f7e..a04ed5b0ab92 100644
--- a/include/net.h
+++ b/include/net.h
@@ -60,8 +60,6 @@ struct eth_device {
 	struct device *parent;
 	char *nodepath;
 
-	struct list_head list;
-
 	IPaddr_t ipaddr;
 	IPaddr_t netmask;
 	char ethaddr[6];
diff --git a/net/eth.c b/net/eth.c
index ce7d839ed113..7229530c055b 100644
--- a/net/eth.c
+++ b/net/eth.c
@@ -545,7 +545,6 @@ void eth_unregister(struct eth_device *edev)
 
 	unregister_device(&edev->dev);
 	slice_exit(&edev->slice);
-	list_del(&edev->list);
 }
 
 void led_trigger_network(enum led_trigger trigger)
-- 
2.39.2




  reply	other threads:[~2024-06-20 12:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-20 12:55 [PATCH 1/2] fixup! base: add class device support Ahmad Fatoum
2024-06-20 12:55 ` Ahmad Fatoum [this message]
2024-07-01 12:10 ` Sascha Hauer

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=20240620125548.464201-2-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox