Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Sep 2021 17:48:29 GMT
From:      "Bjoern A. Zeeb" <bz@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 93b14194acaf - main - LinuxKPI: disable device_release_driver()
Message-ID:  <202109271748.18RHmTAt082072@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by bz:

URL: https://cgit.FreeBSD.org/src/commit/?id=93b14194acaf2c2d80df9c4900a90c6644dcd92b

commit 93b14194acaf2c2d80df9c4900a90c6644dcd92b
Author:     Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: 2021-09-27 17:38:41 +0000
Commit:     Bjoern A. Zeeb <bz@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202109271748.18RHmTAt082072>