git: 93b14194acaf - main - LinuxKPI: disable device_release_driver()
Bjoern A. Zeeb
bz at FreeBSD.org
Mon Sep 27 17:48:30 UTC 2021
The branch main has been updated by bz:
URL: https://cgit.FreeBSD.org/src/commit/?id=93b14194acaf2c2d80df9c4900a90c6644dcd92b
commit 93b14194acaf2c2d80df9c4900a90c6644dcd92b
Author: Bjoern A. Zeeb <bz at FreeBSD.org>
AuthorDate: 2021-09-27 17:38:41 +0000
Commit: Bjoern A. Zeeb <bz at FreeBSD.org>
CommitDate: 2021-09-27 17:45:06 +0000
LinuxKPI: disable device_release_driver()
As reported by multiple people testing iwlwifi, device_release_driver()
can lead to a panic on secondary errors (usually during attach).
Disable device_release_driver() for the short-term to prevent the panic
but leave it in place so it can be re-worked and fixed properly for
the long-term more easily.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
---
sys/compat/linuxkpi/common/include/linux/device.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/sys/compat/linuxkpi/common/include/linux/device.h b/sys/compat/linuxkpi/common/include/linux/device.h
index 4bdc3b831e58..abafcd7ba5c4 100644
--- a/sys/compat/linuxkpi/common/include/linux/device.h
+++ b/sys/compat/linuxkpi/common/include/linux/device.h
@@ -506,6 +506,9 @@ static inline void
device_release_driver(struct device *dev)
{
+#if 0
+ /* This leads to panics. Disable temporarily. Keep to rework. */
+
/* We also need to cleanup LinuxKPI bits. What else? */
lkpi_devres_release_free_list(dev);
dev_set_drvdata(dev, NULL);
@@ -515,6 +518,7 @@ device_release_driver(struct device *dev)
if (device_is_attached(dev->bsddev))
device_detach(dev->bsddev);
mtx_unlock(&Giant);
+#endif
}
static inline int
More information about the dev-commits-src-all
mailing list