From: Rosen Penev <rosenp@gmail.com>
To: "Pali Rohár" <pali@kernel.org>,
"Hans de Goede" <hansg@kernel.org>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
"Matthew Garrett" <matthew.garrett@nebula.com>
Cc: platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] platform/x86: dell-smo8800: Suppress bind attributes of the platform driver
Date: Fri, 13 Nov 2026 22:23:25 -0800 [thread overview]
Message-ID: <0c1bfd7d87cb29c503cbfd17eb64ca88fd12f18c.1794633181.git.rosenp@gmail.com> (raw)
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
reply other threads:[~2026-11-14 6:23 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0c1bfd7d87cb29c503cbfd17eb64ca88fd12f18c.1794633181.git.rosenp@gmail.com \
--to=rosenp@gmail.com \
--cc=hansg@kernel.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=matthew.garrett@nebula.com \
--cc=pali@kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®