Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F146280196
D54615.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
873 B
Referenced Files
None
Subscribers
None
D54615.diff
View Options
diff --git a/sys/dev/asmc/asmc.c b/sys/dev/asmc/asmc.c
--- a/sys/dev/asmc/asmc.c
+++ b/sys/dev/asmc/asmc.c
@@ -791,23 +791,13 @@
static int
asmc_detach(device_t dev)
{
- struct asmc_softc *sc = device_get_softc(dev);
-
- if (sc->sc_sms_tq) {
- taskqueue_drain(sc->sc_sms_tq, &sc->sc_sms_task);
- taskqueue_free(sc->sc_sms_tq);
- }
- if (sc->sc_cookie)
- bus_teardown_intr(dev, sc->sc_irq, sc->sc_cookie);
- if (sc->sc_irq)
- bus_release_resource(dev, SYS_RES_IRQ, sc->sc_rid_irq,
- sc->sc_irq);
- if (sc->sc_ioport)
- bus_release_resource(dev, SYS_RES_IOPORT, sc->sc_rid_port,
- sc->sc_ioport);
- mtx_destroy(&sc->sc_mtx);
- return (0);
+ /*
+ * Prevent module unload to avoid issues with device reprobing
+ * via acpi_driver_added() which can cause kernel panics when
+ * accessing freed driver structures.
+ */
+ return (EBUSY);
}
static int
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Mar 2, 8:59 AM (10 h, 28 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27600021
Default Alt Text
D54615.diff (873 B)
Attached To
Mode
D54615: asmc: Prevent module unload to avoid kernel panic
Attached
Detach File
Event Timeline
Log In to Comment