mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] reset: gpio: suppress bind attributes in sysfs
@ 2025-12-04  9:44 Bartosz Golaszewski
  2025-12-04 11:14 ` Krzysztof Kozlowski
  2026-01-12 10:19 ` Bartosz Golaszewski
  0 siblings, 2 replies; 7+ messages in thread
From: Bartosz Golaszewski @ 2025-12-04  9:44 UTC (permalink / raw)
  To: Philipp Zabel, Krzysztof Kozlowski
  Cc: linux-kernel, Bartosz Golaszewski, stable

This is a special device that's created dynamically and is supposed to
stay in memory forever. We also currently don't have a devlink between
it and the actual reset consumer. Suppress sysfs bind attributes so that
user-space can't unbind the device because - as of now - it will cause a
use-after-free splat from any user that puts the reset control handle.

Fixes: cee544a40e44 ("reset: gpio: Add GPIO-based reset controller")
Cc: stable@vger.kernel.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
---
 drivers/reset/reset-gpio.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/reset/reset-gpio.c b/drivers/reset/reset-gpio.c
index e5512b3b596b..626c4c639c15 100644
--- a/drivers/reset/reset-gpio.c
+++ b/drivers/reset/reset-gpio.c
@@ -111,6 +111,7 @@ static struct auxiliary_driver reset_gpio_driver = {
 	.id_table	= reset_gpio_ids,
 	.driver	= {
 		.name = "reset-gpio",
+		.suppress_bind_attrs = true,
 	},
 };
 module_auxiliary_driver(reset_gpio_driver);
-- 
2.51.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-01-12 10:19 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-12-04  9:44 [PATCH] reset: gpio: suppress bind attributes in sysfs Bartosz Golaszewski
2025-12-04 11:14 ` Krzysztof Kozlowski
2025-12-04 11:22   ` Bartosz Golaszewski
2025-12-04 11:53     ` Krzysztof Kozlowski
2025-12-06  8:45       ` Bartosz Golaszewski
2025-12-08  7:15         ` Krzysztof Kozlowski
2026-01-12 10:19 ` Bartosz Golaszewski

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®