git: 870e31d839c6 - stable/13 - LinuxKPI: disable device_release_driver()
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 19 Nov 2021 00:02:27 UTC
The branch stable/13 has been updated by bz:
URL: https://cgit.FreeBSD.org/src/commit/?id=870e31d839c69a5d90e56399a55a7d30d556c126
commit 870e31d839c69a5d90e56399a55a7d30d556c126
Author: Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: 2021-09-27 17:38:41 +0000
Commit: Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2021-11-19 00:01:24 +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
(cherry picked from commit 93b14194acaf2c2d80df9c4900a90c6644dcd92b)
---
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