* [PATCH] platform/x86: dell-smo8800: Suppress bind attributes of the platform driver
@ 2026-11-14 6:23 Rosen Penev
0 siblings, 0 replies; only message in thread
From: Rosen Penev @ 2026-11-14 6:23 UTC (permalink / raw)
To: Pali Rohár, Hans de Goede, Ilpo Järvinen, Matthew Garrett
Cc: platform-driver-x86, linux-kernel
struct smo8800_device, which holds the misc device and its wait
queue, is allocated with devm_kzalloc() and freed when the device is
unbound. misc_deregister() does not close files that are already
open, so if /dev/freefall is open when the driver is unbound through
sysfs, a reader blocked in smo8800_misc_read() is left sleeping on a
wait queue in freed memory, and smo8800_misc_release() later clears a
bit in it.
Module removal is not affected, since an open /dev/freefall holds a
reference to the module. Unbinding by hand is the only other way to
remove the device, and it is not useful, so hide the bind and unbind
files.
Fixes: 4738d8aabe89 ("platform: x86: dell-smo8800: Dell Latitude freefall driver (ACPI SMO8800/SMO8810)")
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
Developed with the help of an AI coding assistant (Claude Opus 5.5),
which found the issue and drafted the fix; I reviewed it and am
responsible for it. Builds cleanly with W=1.
Tested on a Dell Precision M4800 running v7.2.15, using the equivalent
backports built as out-of-tree modules: the driver loads and the bind/unbind files are gone.
drivers/platform/x86/dell/dell-smo8800.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/platform/x86/dell/dell-smo8800.c b/drivers/platform/x86/dell/dell-smo8800.c
index e056664656a7..aae9a028d69e 100644
--- a/drivers/platform/x86/dell/dell-smo8800.c
+++ b/drivers/platform/x86/dell/dell-smo8800.c
@@ -169,6 +169,7 @@ static struct platform_driver smo8800_driver = {
.driver = {
.name = DRIVER_NAME,
.acpi_match_table = smo8800_ids,
+ .suppress_bind_attrs = true,
},
};
module_platform_driver(smo8800_driver);
base-commit: 2800868f63227c8237d70c41e70d441c919620d6
--
2.56.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-14 6:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-14 6:23 [PATCH] platform/x86: dell-smo8800: Suppress bind attributes of the platform driver Rosen Penev
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®