mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Rosen Penev <rosenp@gmail.com>
To: "Stuart Hayes" <stuart.w.hayes@gmail.com>,
	"Hans de Goede" <hansg@kernel.org>,
	"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
	"Andrew Morton" <akpm@osdl.org>,
	"Doug Warzecha" <Douglas_Warzecha@dell.com>,
	"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>
Cc: platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v2 2/4] platform/x86: dell: dcdbas: Suppress bind attributes of the platform driver
Date: Mon, 16 Nov 2026 12:40:50 -0800	[thread overview]
Message-ID: <c3e83cad97cd52fe9ee130630ca4d7cae7f7f2de.1794861287.git.rosenp@gmail.com> (raw)
In-Reply-To: <cover.1794861287.git.rosenp@gmail.com>

The dcdbas platform device is created by the module itself and stays
in use for as long as the module is loaded: dell-smbios-smm allocates
its SMI buffers against it through dcdbas_smi_alloc() whether or not
the driver is bound.

Binding the driver again after an unbind also leaks state:
dcdbas_check_wsmt() runs a second time and memremap()s the firmware
SMI buffer again, overwriting bios_buffer and leaking the previous
mapping.

Unbinding or rebinding the device by hand is not useful, so hide the
bind and unbind files.

Fixes: 12c956c4f32e ("firmware: dcdbas: Add support for WSMT ACPI table")
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
 drivers/platform/x86/dell/dcdbas.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/platform/x86/dell/dcdbas.c b/drivers/platform/x86/dell/dcdbas.c
index 69365627fd8f..cd72f8c29a86 100644
--- a/drivers/platform/x86/dell/dcdbas.c
+++ b/drivers/platform/x86/dell/dcdbas.c
@@ -708,6 +708,7 @@ static void dcdbas_remove(struct platform_device *dev)
 static struct platform_driver dcdbas_driver = {
 	.driver		= {
 		.name	= DRIVER_NAME,
+		.suppress_bind_attrs = true,
 	},
 	.probe		= dcdbas_probe,
 	.remove		= dcdbas_remove,
-- 
2.56.1


  parent reply	other threads:[~2026-11-16 20:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-16 20:40 [PATCH v2 0/4] platform/x86: dell: dcdbas: Fix SMI completion wait and buffer handling Rosen Penev
2026-11-16 20:40 ` [PATCH v2 1/4] platform/x86: dell: dcdbas: Actually wait for the host control SMI Rosen Penev
2026-11-16 20:40 ` Rosen Penev [this message]
2026-11-16 20:40 ` [PATCH v2 3/4] platform/x86: dell: dcdbas: Release the SMI buffer in remove Rosen Penev
2026-11-16 20:40 ` [PATCH v2 4/4] platform/x86: dell: dcdbas: Validate the WSMT buffer description Rosen Penev

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=c3e83cad97cd52fe9ee130630ca4d7cae7f7f2de.1794861287.git.rosenp@gmail.com \
    --to=rosenp@gmail.com \
    --cc=Douglas_Warzecha@dell.com \
    --cc=akpm@osdl.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=hansg@kernel.org \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=stuart.w.hayes@gmail.com \
    /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®