* [PATCH 00/16] platform/x86: dell-smbios: Fix call filtering, lifetime and error handling
@ 2026-11-16 23:54 Rosen Penev
2026-11-16 23:54 ` [PATCH 01/16] platform/x86: dell-smbios: Only allow unprivileged reads of whitelisted tokens Rosen Penev
` (15 more replies)
0 siblings, 16 replies; 17+ messages in thread
From: Rosen Penev @ 2026-11-16 23:54 UTC (permalink / raw)
To: Hans de Goede, Ilpo Järvinen, Edward O'Callaghan,
Darren Hart (VMware), Mario Limonciello
Cc: platform-driver-x86, Dell.Client.Kernel
Fixes for the dell-smbios dispatcher and its SMM and WMI backends.
Patch 1 is security relevant: /dev/wmi/dell-smbios is mode 0444, and the
WSMT tokens are whitelisted without a capability for both reads and
writes, so any local user can write to the WSMT token location and
change the BIOS setting. Patch 2 closes the related gap where tokens
sharing a location were filtered by whichever came first. Both were
found by code review; I have no WSMT-capable machine to reproduce them on.
Patches 3-11 fix a use-after-free when the dell-smbios.1 device is
unbound, an empty token sysfs group, use of an unpopulated SMI port,
unchecked SMI and registration errors, and a WMI buffer size underflow.
Patches 1-11 carry Fixes: tags and come first so they can be applied
on their own. Patches 12-16 are hardening and cleanups for the next
merge window: they stop unprivileged users from flooding the log,
restrict the token sysfs files by mode, and tidy up the rest.
These patches were developed with the help of an AI coding assistant
(Claude Opus 5.5): it reviewed the drivers, found the issues and drafted
the fixes and changelogs. I reviewed every change and I am responsible
for them.
All patches build cleanly with W=1.
Tested on a Dell Precision M4800 running v7.2.15, using the equivalent
backports built as out-of-tree modules:
- token sysfs files are 0400; unprivileged reads fail, root reads work
- unprivileged non-whitelisted token reads through /dev/wmi/dell-smbios
are rejected, and 503 rejected calls logged 10 lines; root calls work
- dell-laptop, dell-pc and dell-wmi work on top, and three unload/reload
cycles of the whole stack are clean
The WSMT write fix (patch 1) could not be exercised: this machine has no
WSMT tokens. Its seven 0xDA structures all report SMI port 0xb2.
Rosen Penev (16):
platform/x86: dell-smbios: Only allow unprivileged reads of
whitelisted tokens
platform/x86: dell-smbios: Filter every token at the requested
location
platform/x86: dell-smbios: Return the real error from
build_tokens_sysfs()
platform/x86: dell-smbios: Skip 0xDA structures without tokens
platform/x86: dell-smbios: Use dev_driver_string() in debug messages
platform/x86: dell-smbios-smm: Use the first 0xDA structure with an
SMI port
platform/x86: dell-smbios-smm: Propagate SMI request errors
platform/x86: dell-smbios-smm: Clear platform_device when it is
released
platform/x86: dell-smbios-wmi: Don't unregister a driver that failed
to register
platform/x86: dell-smbios-wmi: Reject buffer sizes too small for a
call
platform/x86: dell-smbios: Don't tie dispatcher entries to the device
driver
platform/x86: dell-smbios-smm: Set the WSMT test call after clearing
the buffer
platform/x86: dell-smbios-wmi: Don't let unprivileged users flood the
log
platform/x86: dell-smbios: Suppress bind attributes of the platform
driver
platform/x86: dell-smbios: Restrict token sysfs files with their mode
platform/x86: dell-smbios: Drop smbios_mutex from module exit
drivers/platform/x86/dell/dell-smbios-base.c | 159 +++++++++++--------
drivers/platform/x86/dell/dell-smbios-smm.c | 24 ++-
drivers/platform/x86/dell/dell-smbios-wmi.c | 23 ++-
3 files changed, 134 insertions(+), 72 deletions(-)
base-commit: 2800868f63227c8237d70c41e70d441c919620d6
--
2.56.1
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 01/16] platform/x86: dell-smbios: Only allow unprivileged reads of whitelisted tokens
2026-11-16 23:54 [PATCH 00/16] platform/x86: dell-smbios: Fix call filtering, lifetime and error handling Rosen Penev
@ 2026-11-16 23:54 ` Rosen Penev
2026-11-16 23:54 ` [PATCH 02/16] platform/x86: dell-smbios: Filter every token at the requested location Rosen Penev
` (14 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: Rosen Penev @ 2026-11-16 23:54 UTC (permalink / raw)
To: Hans de Goede, Ilpo Järvinen, Edward O'Callaghan,
Darren Hart (VMware), Mario Limonciello
Cc: platform-driver-x86, Dell.Client.Kernel
The WSMT tokens are whitelisted without a capability so that userspace
can find out whether WMI has to be used instead of SMM. The whitelist
check does not look at the call class though, so the entry applies to
CLASS_TOKEN_WRITE as well as CLASS_TOKEN_READ.
/dev/wmi/dell-smbios is mode 0444 and the ioctl only needs a read-only
open, so any local user can write an arbitrary value to the WSMT token
location and change the BIOS setting.
Only let capability-free whitelist entries match token reads. Writes
fall through to the call whitelist, which requires CAP_SYS_ADMIN.
Fixes: 1f8543a5d602 ("platform/x86: dell-smbios: Add filtering support")
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
drivers/platform/x86/dell/dell-smbios-base.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/platform/x86/dell/dell-smbios-base.c b/drivers/platform/x86/dell/dell-smbios-base.c
index c8e93c12c445..d98e1fb1deef 100644
--- a/drivers/platform/x86/dell/dell-smbios-base.c
+++ b/drivers/platform/x86/dell/dell-smbios-base.c
@@ -255,6 +255,10 @@ int dell_smbios_call_filter(struct device *d,
if (t < token_whitelist[i].min ||
t > token_whitelist[i].max)
continue;
+ /* tokens needing no capability may only be read */
+ if (!token_whitelist[i].need_capability &&
+ buffer->cmd_class != CLASS_TOKEN_READ)
+ continue;
if (!token_whitelist[i].need_capability ||
capable(token_whitelist[i].need_capability)) {
dev_dbg(d, "whitelisted token: %x\n", t);
--
2.56.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 02/16] platform/x86: dell-smbios: Filter every token at the requested location
2026-11-16 23:54 [PATCH 00/16] platform/x86: dell-smbios: Fix call filtering, lifetime and error handling Rosen Penev
2026-11-16 23:54 ` [PATCH 01/16] platform/x86: dell-smbios: Only allow unprivileged reads of whitelisted tokens Rosen Penev
@ 2026-11-16 23:54 ` Rosen Penev
2026-11-16 23:54 ` [PATCH 03/16] platform/x86: dell-smbios: Return the real error from build_tokens_sysfs() Rosen Penev
` (13 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: Rosen Penev @ 2026-11-16 23:54 UTC (permalink / raw)
To: Hans de Goede, Ilpo Järvinen, Edward O'Callaghan,
Darren Hart (VMware), Mario Limonciello
Cc: platform-driver-x86, Dell.Client.Kernel
Token calls identify the token by its location, and the filter maps the
location back to a token ID by taking the first token stored there.
Several tokens commonly share a location (enable/disable pairs, for
example), so which ID gets checked against the blacklist and whitelist
depends on the order of the SMBIOS tables. A blacklisted token can be
reached through the location of a token that comes before it.
The lookup also stops at the first match even if that entry was zeroed
by zero_duplicates(), so an existing location can be reported as
missing.
Move the token handling into a helper that walks every token at the
location, skipping zeroed duplicates. The call is rejected if any of
them is blacklisted, and only accepted by the token whitelist if all of
them are whitelisted.
Fixes: 1f8543a5d602 ("platform/x86: dell-smbios: Add filtering support")
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
drivers/platform/x86/dell/dell-smbios-base.c | 133 ++++++++++++-------
1 file changed, 82 insertions(+), 51 deletions(-)
diff --git a/drivers/platform/x86/dell/dell-smbios-base.c b/drivers/platform/x86/dell/dell-smbios-base.c
index d98e1fb1deef..ab00b04c6b05 100644
--- a/drivers/platform/x86/dell/dell-smbios-base.c
+++ b/drivers/platform/x86/dell/dell-smbios-base.c
@@ -182,10 +182,86 @@ void dell_smbios_unregister_device(struct device *d)
}
EXPORT_SYMBOL_GPL(dell_smbios_unregister_device);
+static bool token_in_range(const struct token_range *range, u16 t)
+{
+ if (!range->min || !range->max)
+ return false;
+ return t >= range->min && t <= range->max;
+}
+
+static bool token_is_whitelisted(struct device *d,
+ struct calling_interface_buffer *buffer, u16 t)
+{
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(token_whitelist); i++) {
+ if (!token_in_range(&token_whitelist[i], t))
+ continue;
+ /* tokens needing no capability may only be read */
+ if (!token_whitelist[i].need_capability) {
+ if (buffer->cmd_class == CLASS_TOKEN_READ)
+ return true;
+ continue;
+ }
+ if (capable(token_whitelist[i].need_capability))
+ return true;
+ }
+
+ dev_dbg(d, "token %x not whitelisted for %u/%u\n", t,
+ buffer->cmd_class, buffer->cmd_select);
+ return false;
+}
+
+/*
+ * Several tokens can share a location (e.g. enable/disable pairs), so every
+ * token at the requested location has to pass the filter.
+ *
+ * Returns 0 if the call is whitelisted, 1 if it should be checked against
+ * the call whitelist, or a negative error code if it is rejected.
+ */
+static int dell_smbios_token_filter(struct device *d,
+ struct calling_interface_buffer *buffer)
+{
+ bool whitelisted = true;
+ bool found = false;
+ u16 t;
+ int i, j;
+
+ if (!da_tokens) {
+ dev_dbg(d, "no token support on this system\n");
+ return -EINVAL;
+ }
+
+ for (i = 0; i < da_num_tokens; i++) {
+ t = da_tokens[i].tokenID;
+ if (!t || da_tokens[i].location != buffer->input[0])
+ continue;
+ found = true;
+
+ for (j = 0; j < ARRAY_SIZE(token_blacklist); j++) {
+ if (token_in_range(&token_blacklist[j], t)) {
+ dev_dbg(d, "blacklisted token: %x\n", t);
+ return -EINVAL;
+ }
+ }
+
+ if (!token_is_whitelisted(d, buffer, t))
+ whitelisted = false;
+ }
+
+ if (!found) {
+ dev_dbg(d, "token at location %04x doesn't exist\n",
+ buffer->input[0]);
+ return -EINVAL;
+ }
+
+ return whitelisted ? 0 : 1;
+}
+
int dell_smbios_call_filter(struct device *d,
struct calling_interface_buffer *buffer)
{
- u16 t = 0;
+ int ret;
int i;
/* can't make calls over 30 */
@@ -213,60 +289,15 @@ int dell_smbios_call_filter(struct device *d,
return -EINVAL;
}
- /* if a token call, find token ID */
-
+ /* if a token call, check the token(s) at the requested location */
if ((buffer->cmd_class == CLASS_TOKEN_READ ||
buffer->cmd_class == CLASS_TOKEN_WRITE) &&
buffer->cmd_select < 3) {
- /* tokens enabled ? */
- if (!da_tokens) {
- dev_dbg(d, "no token support on this system\n");
- return -EINVAL;
- }
-
- /* find the matching token ID */
- for (i = 0; i < da_num_tokens; i++) {
- if (da_tokens[i].location != buffer->input[0])
- continue;
- t = da_tokens[i].tokenID;
- break;
- }
-
- /* token call; but token didn't exist */
- if (!t) {
- dev_dbg(d, "token at location %04x doesn't exist\n",
- buffer->input[0]);
- return -EINVAL;
- }
-
- /* match against token blacklist */
- for (i = 0; i < ARRAY_SIZE(token_blacklist); i++) {
- if (!token_blacklist[i].min || !token_blacklist[i].max)
- continue;
- if (t >= token_blacklist[i].min &&
- t <= token_blacklist[i].max)
- return -EINVAL;
- }
-
- /* match against token whitelist */
- for (i = 0; i < ARRAY_SIZE(token_whitelist); i++) {
- if (!token_whitelist[i].min || !token_whitelist[i].max)
- continue;
- if (t < token_whitelist[i].min ||
- t > token_whitelist[i].max)
- continue;
- /* tokens needing no capability may only be read */
- if (!token_whitelist[i].need_capability &&
- buffer->cmd_class != CLASS_TOKEN_READ)
- continue;
- if (!token_whitelist[i].need_capability ||
- capable(token_whitelist[i].need_capability)) {
- dev_dbg(d, "whitelisted token: %x\n", t);
- return 0;
- }
-
- }
+ ret = dell_smbios_token_filter(d, buffer);
+ if (ret <= 0)
+ return ret;
}
+
/* match against call whitelist */
for (i = 0; i < ARRAY_SIZE(call_whitelist); i++) {
if (buffer->cmd_class != call_whitelist[i].cmd_class)
--
2.56.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 03/16] platform/x86: dell-smbios: Return the real error from build_tokens_sysfs()
2026-11-16 23:54 [PATCH 00/16] platform/x86: dell-smbios: Fix call filtering, lifetime and error handling Rosen Penev
2026-11-16 23:54 ` [PATCH 01/16] platform/x86: dell-smbios: Only allow unprivileged reads of whitelisted tokens Rosen Penev
2026-11-16 23:54 ` [PATCH 02/16] platform/x86: dell-smbios: Filter every token at the requested location Rosen Penev
@ 2026-11-16 23:54 ` Rosen Penev
2026-11-16 23:54 ` [PATCH 04/16] platform/x86: dell-smbios: Skip 0xDA structures without tokens Rosen Penev
` (12 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: Rosen Penev @ 2026-11-16 23:54 UTC (permalink / raw)
To: Hans de Goede, Ilpo Järvinen, Edward O'Callaghan,
Darren Hart (VMware), Mario Limonciello
Cc: platform-driver-x86, Dell.Client.Kernel
build_tokens_sysfs() returns -ENOMEM on every failure, including when
sysfs_create_group() fails for another reason. Pass that error through.
Fixes: 33b9ca1e53b4 ("platform/x86: dell-smbios: Add a sysfs interface for SMBIOS tokens")
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
drivers/platform/x86/dell/dell-smbios-base.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/platform/x86/dell/dell-smbios-base.c b/drivers/platform/x86/dell/dell-smbios-base.c
index ab00b04c6b05..be68f6a25b41 100644
--- a/drivers/platform/x86/dell/dell-smbios-base.c
+++ b/drivers/platform/x86/dell/dell-smbios-base.c
@@ -576,18 +576,21 @@ static int build_tokens_sysfs(struct platform_device *dev)
ret = sysfs_create_group(&dev->dev.kobj, &smbios_attribute_group);
if (ret)
- goto out_unwind_strings;
+ goto out_unwind;
return 0;
out_unwind_strings:
+ ret = -ENOMEM;
+out_unwind:
while (i--) {
kfree(token_entries[i].location_attr.attr.name);
kfree(token_entries[i].value_attr.attr.name);
}
kfree(token_attrs);
+ return ret;
+
out_allocate_attrs:
kfree(token_entries);
-
return -ENOMEM;
}
--
2.56.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 04/16] platform/x86: dell-smbios: Skip 0xDA structures without tokens
2026-11-16 23:54 [PATCH 00/16] platform/x86: dell-smbios: Fix call filtering, lifetime and error handling Rosen Penev
` (2 preceding siblings ...)
2026-11-16 23:54 ` [PATCH 03/16] platform/x86: dell-smbios: Return the real error from build_tokens_sysfs() Rosen Penev
@ 2026-11-16 23:54 ` Rosen Penev
2026-11-16 23:54 ` [PATCH 05/16] platform/x86: dell-smbios: Use dev_driver_string() in debug messages Rosen Penev
` (11 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: Rosen Penev @ 2026-11-16 23:54 UTC (permalink / raw)
To: Hans de Goede, Ilpo Järvinen, Edward O'Callaghan,
Darren Hart (VMware), Mario Limonciello
Cc: platform-driver-x86, Dell.Client.Kernel
When a 0xDA structure only holds the terminator and no tokens have been
collected yet, parse_da_table() calls krealloc(NULL, 0). That returns
ZERO_SIZE_PTR, so da_tokens looks valid even though there are no tokens,
and an empty "tokens" sysfs group is created.
Return before reallocating when the structure has no tokens.
Fixes: 33b9ca1e53b4 ("platform/x86: dell-smbios: Add a sysfs interface for SMBIOS tokens")
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
drivers/platform/x86/dell/dell-smbios-base.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/platform/x86/dell/dell-smbios-base.c b/drivers/platform/x86/dell/dell-smbios-base.c
index be68f6a25b41..4da19f7da81e 100644
--- a/drivers/platform/x86/dell/dell-smbios-base.c
+++ b/drivers/platform/x86/dell/dell-smbios-base.c
@@ -443,6 +443,9 @@ static void __init parse_da_table(const struct dmi_header *dm)
da_supported_commands = table->supportedCmds;
+ if (tokens <= 0)
+ return;
+
new_da_tokens = krealloc(da_tokens, (da_num_tokens + tokens) *
sizeof(struct calling_interface_token),
GFP_KERNEL);
--
2.56.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 05/16] platform/x86: dell-smbios: Use dev_driver_string() in debug messages
2026-11-16 23:54 [PATCH 00/16] platform/x86: dell-smbios: Fix call filtering, lifetime and error handling Rosen Penev
` (3 preceding siblings ...)
2026-11-16 23:54 ` [PATCH 04/16] platform/x86: dell-smbios: Skip 0xDA structures without tokens Rosen Penev
@ 2026-11-16 23:54 ` Rosen Penev
2026-11-16 23:54 ` [PATCH 06/16] platform/x86: dell-smbios-smm: Use the first 0xDA structure with an SMI port Rosen Penev
` (10 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: Rosen Penev @ 2026-11-16 23:54 UTC (permalink / raw)
To: Hans de Goede, Ilpo Järvinen, Edward O'Callaghan,
Darren Hart (VMware), Mario Limonciello
Cc: platform-driver-x86, Dell.Client.Kernel
dell_smbios_register_device() and dell_smbios_unregister_device()
dereference d->driver for their debug messages. The device is not
guaranteed to be bound to a driver, so use dev_driver_string(), which
handles that case.
Fixes: 549b4930f057 ("platform/x86: dell-smbios: Introduce dispatcher for SMM calls")
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
drivers/platform/x86/dell/dell-smbios-base.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/platform/x86/dell/dell-smbios-base.c b/drivers/platform/x86/dell/dell-smbios-base.c
index 4da19f7da81e..5a9c28ab25af 100644
--- a/drivers/platform/x86/dell/dell-smbios-base.c
+++ b/drivers/platform/x86/dell/dell-smbios-base.c
@@ -160,7 +160,7 @@ int dell_smbios_register_device(struct device *d, int priority, smbios_callback_
mutex_lock(&smbios_mutex);
list_add_tail(&priv->list, &smbios_device_list);
mutex_unlock(&smbios_mutex);
- dev_dbg(d, "Added device: %s\n", d->driver->name);
+ dev_dbg(d, "Added device: %s\n", dev_driver_string(d));
return 0;
}
EXPORT_SYMBOL_GPL(dell_smbios_register_device);
@@ -178,7 +178,7 @@ void dell_smbios_unregister_device(struct device *d)
}
}
mutex_unlock(&smbios_mutex);
- dev_dbg(d, "Remove device: %s\n", d->driver->name);
+ dev_dbg(d, "Remove device: %s\n", dev_driver_string(d));
}
EXPORT_SYMBOL_GPL(dell_smbios_unregister_device);
--
2.56.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 06/16] platform/x86: dell-smbios-smm: Use the first 0xDA structure with an SMI port
2026-11-16 23:54 [PATCH 00/16] platform/x86: dell-smbios: Fix call filtering, lifetime and error handling Rosen Penev
` (4 preceding siblings ...)
2026-11-16 23:54 ` [PATCH 05/16] platform/x86: dell-smbios: Use dev_driver_string() in debug messages Rosen Penev
@ 2026-11-16 23:54 ` Rosen Penev
2026-11-16 23:54 ` [PATCH 07/16] platform/x86: dell-smbios-smm: Propagate SMI request errors Rosen Penev
` (9 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: Rosen Penev @ 2026-11-16 23:54 UTC (permalink / raw)
To: Hans de Goede, Ilpo Järvinen, Edward O'Callaghan,
Darren Hart (VMware), Mario Limonciello
Cc: platform-driver-x86, Dell.Client.Kernel
parse_da_table() runs for every SMBIOS 0xDA structure and overwrites the
SMI command port and code each time, so the last structure wins. Systems
can expose several 0xDA structures, and they are not all filled in the
same way: on a Dell Precision M4800 all seven report port 0xb2, but the
last one reports zero for its supported commands.
If the last structure has no SMI port, every SMM call writes the command
code to I/O port 0, which on x86 is the legacy DMA controller.
Take the port and code from the first structure that has a non-zero
port, and fail to initialize the SMM backend if none has one.
Fixes: 549b4930f057 ("platform/x86: dell-smbios: Introduce dispatcher for SMM calls")
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
drivers/platform/x86/dell/dell-smbios-smm.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/drivers/platform/x86/dell/dell-smbios-smm.c b/drivers/platform/x86/dell/dell-smbios-smm.c
index fc4a674c692e..843e379b2286 100644
--- a/drivers/platform/x86/dell/dell-smbios-smm.c
+++ b/drivers/platform/x86/dell/dell-smbios-smm.c
@@ -36,6 +36,13 @@ static void parse_da_table(const struct dmi_header *dm)
if (dm->length < 17)
return;
+ /*
+ * Systems may expose several 0xDA structures and not all of them fill
+ * in the SMI port, so use the first one that does.
+ */
+ if (da_command_address || !table->cmdIOAddress)
+ return;
+
da_command_address = table->cmdIOAddress;
da_command_code = table->cmdIOCode;
}
@@ -108,6 +115,11 @@ int init_dell_smbios_smm(void)
buffer = (void *)smi_buf.virt;
dmi_walk(find_cmd_address, NULL);
+ if (!da_command_address) {
+ pr_debug("No SMI command address found\n");
+ ret = -ENODEV;
+ goto fail_wsmt;
+ }
if (test_wsmt_enabled(&platform_device->dev)) {
pr_debug("Disabling due to WSMT enabled\n");
--
2.56.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 07/16] platform/x86: dell-smbios-smm: Propagate SMI request errors
2026-11-16 23:54 [PATCH 00/16] platform/x86: dell-smbios: Fix call filtering, lifetime and error handling Rosen Penev
` (5 preceding siblings ...)
2026-11-16 23:54 ` [PATCH 06/16] platform/x86: dell-smbios-smm: Use the first 0xDA structure with an SMI port Rosen Penev
@ 2026-11-16 23:54 ` Rosen Penev
2026-11-16 23:54 ` [PATCH 08/16] platform/x86: dell-smbios-smm: Clear platform_device when it is released Rosen Penev
` (8 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: Rosen Penev @ 2026-11-16 23:54 UTC (permalink / raw)
To: Hans de Goede, Ilpo Järvinen, Edward O'Callaghan,
Darren Hart (VMware), Mario Limonciello
Cc: platform-driver-x86, Dell.Client.Kernel
dell_smbios_smm_call() ignores the return value of dcdbas_smi_request()
and always returns 0. If the SMI was never raised, the caller gets its
own input buffer back and treats output[0] as the firmware's answer.
Return the error, and only copy the buffer back when the SMI ran.
Fixes: 549b4930f057 ("platform/x86: dell-smbios: Introduce dispatcher for SMM calls")
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
drivers/platform/x86/dell/dell-smbios-smm.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/platform/x86/dell/dell-smbios-smm.c b/drivers/platform/x86/dell/dell-smbios-smm.c
index 843e379b2286..8c297732f351 100644
--- a/drivers/platform/x86/dell/dell-smbios-smm.c
+++ b/drivers/platform/x86/dell/dell-smbios-smm.c
@@ -60,6 +60,7 @@ static int dell_smbios_smm_call(struct device *dev, struct calling_interface_buf
{
struct smi_cmd command;
size_t size;
+ int ret;
size = sizeof(struct calling_interface_buffer);
command.magic = SMI_CMD_MAGIC;
@@ -70,10 +71,11 @@ static int dell_smbios_smm_call(struct device *dev, struct calling_interface_buf
mutex_lock(&smm_mutex);
memcpy(buffer, input, size);
- dcdbas_smi_request(&command);
- memcpy(input, buffer, size);
+ ret = dcdbas_smi_request(&command);
+ if (!ret)
+ memcpy(input, buffer, size);
mutex_unlock(&smm_mutex);
- return 0;
+ return ret;
}
/* When enabled this indicates that SMM won't work */
--
2.56.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 08/16] platform/x86: dell-smbios-smm: Clear platform_device when it is released
2026-11-16 23:54 [PATCH 00/16] platform/x86: dell-smbios: Fix call filtering, lifetime and error handling Rosen Penev
` (6 preceding siblings ...)
2026-11-16 23:54 ` [PATCH 07/16] platform/x86: dell-smbios-smm: Propagate SMI request errors Rosen Penev
@ 2026-11-16 23:54 ` Rosen Penev
2026-11-16 23:54 ` [PATCH 09/16] platform/x86: dell-smbios-wmi: Don't unregister a driver that failed to register Rosen Penev
` (7 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: Rosen Penev @ 2026-11-16 23:54 UTC (permalink / raw)
To: Hans de Goede, Ilpo Järvinen, Edward O'Callaghan,
Darren Hart (VMware), Mario Limonciello
Cc: platform-driver-x86, Dell.Client.Kernel
If platform_device_add() or dell_smbios_register_device() fails,
init_dell_smbios_smm() drops the platform device but leaves the static
pointer set. dell_smbios_exit() calls exit_dell_smbios_smm()
unconditionally, so when the WMI backend loaded and SMM did not, module
unload unregisters the freed device and frees smi_buf a second time.
Clear the pointer whenever the device is released.
Fixes: 549b4930f057 ("platform/x86: dell-smbios: Introduce dispatcher for SMM calls")
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
drivers/platform/x86/dell/dell-smbios-smm.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/platform/x86/dell/dell-smbios-smm.c b/drivers/platform/x86/dell/dell-smbios-smm.c
index 8c297732f351..d9c41ecaf90d 100644
--- a/drivers/platform/x86/dell/dell-smbios-smm.c
+++ b/drivers/platform/x86/dell/dell-smbios-smm.c
@@ -150,6 +150,7 @@ int init_dell_smbios_smm(void)
fail_platform_device_add:
platform_device_put(platform_device);
+ platform_device = NULL;
fail_wsmt:
fail_platform_device_alloc:
@@ -162,6 +163,7 @@ void exit_dell_smbios_smm(void)
if (platform_device) {
dell_smbios_unregister_device(&platform_device->dev);
platform_device_unregister(platform_device);
+ platform_device = NULL;
dcdbas_smi_free(&smi_buf);
}
}
--
2.56.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 09/16] platform/x86: dell-smbios-wmi: Don't unregister a driver that failed to register
2026-11-16 23:54 [PATCH 00/16] platform/x86: dell-smbios: Fix call filtering, lifetime and error handling Rosen Penev
` (7 preceding siblings ...)
2026-11-16 23:54 ` [PATCH 08/16] platform/x86: dell-smbios-smm: Clear platform_device when it is released Rosen Penev
@ 2026-11-16 23:54 ` Rosen Penev
2026-11-16 23:54 ` [PATCH 10/16] platform/x86: dell-smbios-wmi: Reject buffer sizes too small for a call Rosen Penev
` (6 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: Rosen Penev @ 2026-11-16 23:54 UTC (permalink / raw)
To: Hans de Goede, Ilpo Järvinen, Edward O'Callaghan,
Darren Hart (VMware), Mario Limonciello
Cc: platform-driver-x86, Dell.Client.Kernel
exit_dell_smbios_wmi() only checks wmi_supported, which stays set when
wmi_driver_register() fails. dell_smbios_exit() calls it unconditionally,
so if the SMM backend loaded and the WMI one did not, module unload
unregisters a driver that was never registered.
Clear wmi_supported when registration fails.
Fixes: 1a258e670434 ("platform/x86: dell-smbios-wmi: Add new WMI dispatcher driver")
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
drivers/platform/x86/dell/dell-smbios-wmi.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/platform/x86/dell/dell-smbios-wmi.c b/drivers/platform/x86/dell/dell-smbios-wmi.c
index 7a5c6d7730ab..e126fb4f048e 100644
--- a/drivers/platform/x86/dell/dell-smbios-wmi.c
+++ b/drivers/platform/x86/dell/dell-smbios-wmi.c
@@ -308,12 +308,18 @@ static struct wmi_driver dell_smbios_wmi_driver = {
int init_dell_smbios_wmi(void)
{
+ int ret;
+
dmi_walk(find_b1, NULL);
if (!wmi_supported)
return -ENODEV;
- return wmi_driver_register(&dell_smbios_wmi_driver);
+ ret = wmi_driver_register(&dell_smbios_wmi_driver);
+ if (ret)
+ wmi_supported = 0;
+
+ return ret;
}
void exit_dell_smbios_wmi(void)
--
2.56.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 10/16] platform/x86: dell-smbios-wmi: Reject buffer sizes too small for a call
2026-11-16 23:54 [PATCH 00/16] platform/x86: dell-smbios: Fix call filtering, lifetime and error handling Rosen Penev
` (8 preceding siblings ...)
2026-11-16 23:54 ` [PATCH 09/16] platform/x86: dell-smbios-wmi: Don't unregister a driver that failed to register Rosen Penev
@ 2026-11-16 23:54 ` Rosen Penev
2026-11-16 23:54 ` [PATCH 11/16] platform/x86: dell-smbios: Don't tie dispatcher entries to the device driver Rosen Penev
` (5 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: Rosen Penev @ 2026-11-16 23:54 UTC (permalink / raw)
To: Hans de Goede, Ilpo Järvinen, Edward O'Callaghan,
Darren Hart (VMware), Mario Limonciello
Cc: platform-driver-x86, Dell.Client.Kernel
The WMI buffer size comes from the firmware descriptor and is not
checked. dell_smbios_wmi_call() clears the part of the buffer past the
standard call structure with
difference = priv->req_buf_size - sizeof(u64) - size;
which wraps around if the firmware reports less than
sizeof(struct calling_interface_buffer), and the following memset()
runs far past the buffer.
Refuse to probe if the buffer cannot hold a call.
Fixes: 1a258e670434 ("platform/x86: dell-smbios-wmi: Add new WMI dispatcher driver")
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
drivers/platform/x86/dell/dell-smbios-wmi.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/platform/x86/dell/dell-smbios-wmi.c b/drivers/platform/x86/dell/dell-smbios-wmi.c
index e126fb4f048e..ffc8bc87a86d 100644
--- a/drivers/platform/x86/dell/dell-smbios-wmi.c
+++ b/drivers/platform/x86/dell/dell-smbios-wmi.c
@@ -233,6 +233,11 @@ static int dell_smbios_wmi_probe(struct wmi_device *wdev, const void *context)
if (!dell_wmi_get_size(&buffer_size))
return -EPROBE_DEFER;
+ if (buffer_size < sizeof(struct calling_interface_buffer)) {
+ dev_err(&wdev->dev, "WMI buffer size %u is too small\n", buffer_size);
+ return -EINVAL;
+ }
+
priv->req_buf_size = buffer_size;
/* some SMBIOS calls fail unless BIOS contains hotfix */
--
2.56.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 11/16] platform/x86: dell-smbios: Don't tie dispatcher entries to the device driver
2026-11-16 23:54 [PATCH 00/16] platform/x86: dell-smbios: Fix call filtering, lifetime and error handling Rosen Penev
` (9 preceding siblings ...)
2026-11-16 23:54 ` [PATCH 10/16] platform/x86: dell-smbios-wmi: Reject buffer sizes too small for a call Rosen Penev
@ 2026-11-16 23:54 ` Rosen Penev
2026-11-16 23:54 ` [PATCH 12/16] platform/x86: dell-smbios-smm: Set the WSMT test call after clearing the buffer Rosen Penev
` (4 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: Rosen Penev @ 2026-11-16 23:54 UTC (permalink / raw)
To: Hans de Goede, Ilpo Järvinen, Edward O'Callaghan,
Darren Hart (VMware), Mario Limonciello
Cc: platform-driver-x86, Dell.Client.Kernel
dell_smbios_register_device() allocates the dispatcher entry with
devm_kzalloc() on the registered device, so it is freed when that
device is unbound from its driver, whether or not it was unregistered.
The SMM backend registers the dell-smbios.1 platform device, which is
bound to the base module's platform driver and never unregisters on
unbind. Writing dell-smbios.1 to the driver's unbind file frees the
entry while it is still on smbios_device_list, and the next
dell_smbios_call() from dell-laptop, dell-pc or dell-wmi walks freed
memory.
Allocate the entry with kzalloc() and free it in
dell_smbios_unregister_device(), so it lives exactly as long as it is
on the list.
Fixes: 549b4930f057 ("platform/x86: dell-smbios: Introduce dispatcher for SMM calls")
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
drivers/platform/x86/dell/dell-smbios-base.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/platform/x86/dell/dell-smbios-base.c b/drivers/platform/x86/dell/dell-smbios-base.c
index 5a9c28ab25af..9105154fbb92 100644
--- a/drivers/platform/x86/dell/dell-smbios-base.c
+++ b/drivers/platform/x86/dell/dell-smbios-base.c
@@ -150,7 +150,7 @@ int dell_smbios_register_device(struct device *d, int priority, smbios_callback_
{
struct smbios_device *priv;
- priv = devm_kzalloc_obj(d, struct smbios_device);
+ priv = kzalloc_obj(*priv);
if (!priv)
return -ENOMEM;
get_device(d);
@@ -174,6 +174,7 @@ void dell_smbios_unregister_device(struct device *d)
if (priv->device == d) {
list_del(&priv->list);
put_device(d);
+ kfree(priv);
break;
}
}
--
2.56.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 12/16] platform/x86: dell-smbios-smm: Set the WSMT test call after clearing the buffer
2026-11-16 23:54 [PATCH 00/16] platform/x86: dell-smbios: Fix call filtering, lifetime and error handling Rosen Penev
` (10 preceding siblings ...)
2026-11-16 23:54 ` [PATCH 11/16] platform/x86: dell-smbios: Don't tie dispatcher entries to the device driver Rosen Penev
@ 2026-11-16 23:54 ` Rosen Penev
2026-11-16 23:54 ` [PATCH 13/16] platform/x86: dell-smbios-wmi: Don't let unprivileged users flood the log Rosen Penev
` (3 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: Rosen Penev @ 2026-11-16 23:54 UTC (permalink / raw)
To: Hans de Goede, Ilpo Järvinen, Edward O'Callaghan,
Darren Hart (VMware), Mario Limonciello
Cc: platform-driver-x86, Dell.Client.Kernel
test_wsmt_enabled() sets the class and select and then clears the whole
buffer. It only works because CLASS_TOKEN_READ and SELECT_TOKEN_STD are
both 0. Clear the buffer first.
No functional change.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
drivers/platform/x86/dell/dell-smbios-smm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/platform/x86/dell/dell-smbios-smm.c b/drivers/platform/x86/dell/dell-smbios-smm.c
index d9c41ecaf90d..8d1e7a14b112 100644
--- a/drivers/platform/x86/dell/dell-smbios-smm.c
+++ b/drivers/platform/x86/dell/dell-smbios-smm.c
@@ -92,9 +92,9 @@ static bool test_wsmt_enabled(struct device *dev)
* - If WSMT disabled it will be overwritten by SMM
* - If WSMT enabled then dummy value will remain
*/
+ memset(buffer, 0, sizeof(struct calling_interface_buffer));
buffer->cmd_class = CLASS_TOKEN_READ;
buffer->cmd_select = SELECT_TOKEN_STD;
- memset(buffer, 0, sizeof(struct calling_interface_buffer));
buffer->input[0] = wsmt->location;
buffer->output[0] = 99;
dell_smbios_smm_call(dev, buffer);
--
2.56.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 13/16] platform/x86: dell-smbios-wmi: Don't let unprivileged users flood the log
2026-11-16 23:54 [PATCH 00/16] platform/x86: dell-smbios: Fix call filtering, lifetime and error handling Rosen Penev
` (11 preceding siblings ...)
2026-11-16 23:54 ` [PATCH 12/16] platform/x86: dell-smbios-smm: Set the WSMT test call after clearing the buffer Rosen Penev
@ 2026-11-16 23:54 ` Rosen Penev
2026-11-16 23:54 ` [PATCH 14/16] platform/x86: dell-smbios: Suppress bind attributes of the platform driver Rosen Penev
` (2 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: Rosen Penev @ 2026-11-16 23:54 UTC (permalink / raw)
To: Hans de Goede, Ilpo Järvinen, Edward O'Callaghan,
Darren Hart (VMware), Mario Limonciello
Cc: platform-driver-x86, Dell.Client.Kernel
/dev/wmi/dell-smbios can be opened by any user, and the ioctl logs an
error for an oversized buffer and for every call rejected by the
filter. A local user can flood the kernel log by repeating either.
An oversized buffer is handled fine, so log it at debug level, and
ratelimit the rejected call message.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
drivers/platform/x86/dell/dell-smbios-wmi.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/platform/x86/dell/dell-smbios-wmi.c b/drivers/platform/x86/dell/dell-smbios-wmi.c
index ffc8bc87a86d..3ee37a21c566 100644
--- a/drivers/platform/x86/dell/dell-smbios-wmi.c
+++ b/drivers/platform/x86/dell/dell-smbios-wmi.c
@@ -119,17 +119,17 @@ static long dell_smbios_wmi_do_ioctl(struct wmi_smbios_priv *priv,
/* if it's too big, warn, driver will only use what is needed */
if (priv->buf->length > priv->req_buf_size)
- dev_err(&priv->wdev->dev, "Buffer %llu is bigger than required %llu\n",
+ dev_dbg(&priv->wdev->dev, "Buffer %llu is bigger than required %llu\n",
priv->buf->length, priv->req_buf_size);
if (copy_from_user(priv->buf, arg, priv->req_buf_size))
return -EFAULT;
if (dell_smbios_call_filter(&priv->wdev->dev, &priv->buf->std)) {
- dev_err(&priv->wdev->dev, "Invalid call %d/%d:%8x\n",
- priv->buf->std.cmd_class,
- priv->buf->std.cmd_select,
- priv->buf->std.input[0]);
+ dev_err_ratelimited(&priv->wdev->dev, "Invalid call %d/%d:%8x\n",
+ priv->buf->std.cmd_class,
+ priv->buf->std.cmd_select,
+ priv->buf->std.input[0]);
return -EINVAL;
}
--
2.56.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 14/16] platform/x86: dell-smbios: Suppress bind attributes of the platform driver
2026-11-16 23:54 [PATCH 00/16] platform/x86: dell-smbios: Fix call filtering, lifetime and error handling Rosen Penev
` (12 preceding siblings ...)
2026-11-16 23:54 ` [PATCH 13/16] platform/x86: dell-smbios-wmi: Don't let unprivileged users flood the log Rosen Penev
@ 2026-11-16 23:54 ` Rosen Penev
2026-11-16 23:54 ` [PATCH 15/16] platform/x86: dell-smbios: Restrict token sysfs files with their mode Rosen Penev
2026-11-16 23:55 ` [PATCH 16/16] platform/x86: dell-smbios: Drop smbios_mutex from module exit Rosen Penev
15 siblings, 0 replies; 17+ messages in thread
From: Rosen Penev @ 2026-11-16 23:54 UTC (permalink / raw)
To: Hans de Goede, Ilpo Järvinen, Edward O'Callaghan,
Darren Hart (VMware), Mario Limonciello
Cc: platform-driver-x86, Dell.Client.Kernel
The dell-smbios platform driver has no probe or remove callbacks. It
only exists so the platform devices created by the module have a
driver, and binding or unbinding them by hand does nothing useful while
the rest of the module keeps using them.
Hide the bind and unbind files.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
drivers/platform/x86/dell/dell-smbios-base.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/platform/x86/dell/dell-smbios-base.c b/drivers/platform/x86/dell/dell-smbios-base.c
index 9105154fbb92..8f48a8c4b9fc 100644
--- a/drivers/platform/x86/dell/dell-smbios-base.c
+++ b/drivers/platform/x86/dell/dell-smbios-base.c
@@ -524,6 +524,7 @@ static struct attribute_group smbios_attribute_group = {
static struct platform_driver platform_driver = {
.driver = {
.name = "dell-smbios",
+ .suppress_bind_attrs = true,
},
};
--
2.56.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 15/16] platform/x86: dell-smbios: Restrict token sysfs files with their mode
2026-11-16 23:54 [PATCH 00/16] platform/x86: dell-smbios: Fix call filtering, lifetime and error handling Rosen Penev
` (13 preceding siblings ...)
2026-11-16 23:54 ` [PATCH 14/16] platform/x86: dell-smbios: Suppress bind attributes of the platform driver Rosen Penev
@ 2026-11-16 23:54 ` Rosen Penev
2026-11-16 23:55 ` [PATCH 16/16] platform/x86: dell-smbios: Drop smbios_mutex from module exit Rosen Penev
15 siblings, 0 replies; 17+ messages in thread
From: Rosen Penev @ 2026-11-16 23:54 UTC (permalink / raw)
To: Hans de Goede, Ilpo Järvinen, Edward O'Callaghan,
Darren Hart (VMware), Mario Limonciello
Cc: platform-driver-x86, Dell.Client.Kernel
The token location and value files are world-readable and check
capable(CAP_SYS_ADMIN) on every read. Checking capabilities in a sysfs
show() callback tests the credentials of whoever reads, not whoever
opened the file, and the permissions shown by ls do not match what is
enforced.
Make the files 0400 and drop the check. Only root can still read them,
but an unprivileged open now fails with -EACCES instead of a read
failing with -EPERM.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
drivers/platform/x86/dell/dell-smbios-base.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/drivers/platform/x86/dell/dell-smbios-base.c b/drivers/platform/x86/dell/dell-smbios-base.c
index 8f48a8c4b9fc..8c70e173866a 100644
--- a/drivers/platform/x86/dell/dell-smbios-base.c
+++ b/drivers/platform/x86/dell/dell-smbios-base.c
@@ -500,9 +500,6 @@ static ssize_t location_show(struct device *dev,
{
struct token_sysfs_data *data = container_of(attr, struct token_sysfs_data, location_attr);
- if (!capable(CAP_SYS_ADMIN))
- return -EPERM;
-
return sysfs_emit(buf, "%08x", data->token->location);
}
@@ -511,9 +508,6 @@ static ssize_t value_show(struct device *dev,
{
struct token_sysfs_data *data = container_of(attr, struct token_sysfs_data, value_attr);
- if (!capable(CAP_SYS_ADMIN))
- return -EPERM;
-
return sysfs_emit(buf, "%08x", data->token->value);
}
@@ -559,7 +553,7 @@ static int build_tokens_sysfs(struct platform_device *dev)
sysfs_attr_init(&token_entries[i].location_attr.attr);
token_entries[i].location_attr.attr.name = location_name;
- token_entries[i].location_attr.attr.mode = 0444;
+ token_entries[i].location_attr.attr.mode = 0400;
token_entries[i].location_attr.show = location_show;
token_attrs[j++] = &token_entries[i].location_attr.attr;
@@ -573,7 +567,7 @@ static int build_tokens_sysfs(struct platform_device *dev)
sysfs_attr_init(&token_entries[i].value_attr.attr);
token_entries[i].value_attr.attr.name = value_name;
- token_entries[i].value_attr.attr.mode = 0444;
+ token_entries[i].value_attr.attr.mode = 0400;
token_entries[i].value_attr.show = value_show;
token_attrs[j++] = &token_entries[i].value_attr.attr;
}
--
2.56.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 16/16] platform/x86: dell-smbios: Drop smbios_mutex from module exit
2026-11-16 23:54 [PATCH 00/16] platform/x86: dell-smbios: Fix call filtering, lifetime and error handling Rosen Penev
` (14 preceding siblings ...)
2026-11-16 23:54 ` [PATCH 15/16] platform/x86: dell-smbios: Restrict token sysfs files with their mode Rosen Penev
@ 2026-11-16 23:55 ` Rosen Penev
15 siblings, 0 replies; 17+ messages in thread
From: Rosen Penev @ 2026-11-16 23:55 UTC (permalink / raw)
To: Hans de Goede, Ilpo Järvinen, Edward O'Callaghan,
Darren Hart (VMware), Mario Limonciello
Cc: platform-driver-x86, Dell.Client.Kernel
smbios_mutex protects the list of dispatcher backends. By the time
dell_smbios_exit() tears down the token sysfs group and frees the
tokens, both backends are unregistered and no module that uses
dell-smbios is loaded, so there is nothing to protect.
No functional change.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
drivers/platform/x86/dell/dell-smbios-base.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/platform/x86/dell/dell-smbios-base.c b/drivers/platform/x86/dell/dell-smbios-base.c
index 8c70e173866a..0cd8725573cc 100644
--- a/drivers/platform/x86/dell/dell-smbios-base.c
+++ b/drivers/platform/x86/dell/dell-smbios-base.c
@@ -682,7 +682,6 @@ static void __exit dell_smbios_exit(void)
{
exit_dell_smbios_wmi();
exit_dell_smbios_smm();
- mutex_lock(&smbios_mutex);
if (platform_device) {
if (da_tokens)
free_group(platform_device);
@@ -690,7 +689,6 @@ static void __exit dell_smbios_exit(void)
platform_driver_unregister(&platform_driver);
}
kfree(da_tokens);
- mutex_unlock(&smbios_mutex);
}
module_init(dell_smbios_init);
--
2.56.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
end of thread, other threads:[~2026-11-16 23:55 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-16 23:54 [PATCH 00/16] platform/x86: dell-smbios: Fix call filtering, lifetime and error handling Rosen Penev
2026-11-16 23:54 ` [PATCH 01/16] platform/x86: dell-smbios: Only allow unprivileged reads of whitelisted tokens Rosen Penev
2026-11-16 23:54 ` [PATCH 02/16] platform/x86: dell-smbios: Filter every token at the requested location Rosen Penev
2026-11-16 23:54 ` [PATCH 03/16] platform/x86: dell-smbios: Return the real error from build_tokens_sysfs() Rosen Penev
2026-11-16 23:54 ` [PATCH 04/16] platform/x86: dell-smbios: Skip 0xDA structures without tokens Rosen Penev
2026-11-16 23:54 ` [PATCH 05/16] platform/x86: dell-smbios: Use dev_driver_string() in debug messages Rosen Penev
2026-11-16 23:54 ` [PATCH 06/16] platform/x86: dell-smbios-smm: Use the first 0xDA structure with an SMI port Rosen Penev
2026-11-16 23:54 ` [PATCH 07/16] platform/x86: dell-smbios-smm: Propagate SMI request errors Rosen Penev
2026-11-16 23:54 ` [PATCH 08/16] platform/x86: dell-smbios-smm: Clear platform_device when it is released Rosen Penev
2026-11-16 23:54 ` [PATCH 09/16] platform/x86: dell-smbios-wmi: Don't unregister a driver that failed to register Rosen Penev
2026-11-16 23:54 ` [PATCH 10/16] platform/x86: dell-smbios-wmi: Reject buffer sizes too small for a call Rosen Penev
2026-11-16 23:54 ` [PATCH 11/16] platform/x86: dell-smbios: Don't tie dispatcher entries to the device driver Rosen Penev
2026-11-16 23:54 ` [PATCH 12/16] platform/x86: dell-smbios-smm: Set the WSMT test call after clearing the buffer Rosen Penev
2026-11-16 23:54 ` [PATCH 13/16] platform/x86: dell-smbios-wmi: Don't let unprivileged users flood the log Rosen Penev
2026-11-16 23:54 ` [PATCH 14/16] platform/x86: dell-smbios: Suppress bind attributes of the platform driver Rosen Penev
2026-11-16 23:54 ` [PATCH 15/16] platform/x86: dell-smbios: Restrict token sysfs files with their mode Rosen Penev
2026-11-16 23:55 ` [PATCH 16/16] platform/x86: dell-smbios: Drop smbios_mutex from module exit Rosen Penev
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.