Skip to contentSkip to conversation

FAILED: Patch "reset: gpio: suppress bind attributes in sysfs" failed to apply to 6.12-stable tree

PATCH Sasha Levin 1 participant 1 message Mar 1

Subsystems (3)
lore
Share & tools
lore

Sasha Levin

author maintainer
#0 lore raw

The patch below does not apply to the 6.12-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

Thanks,
Sasha

------------------ original commit in Linus's tree ------------------

From 16de4c6a8fe9ff497ca1aba33ef0dbee09f11952 Mon Sep 17 00:00:00 2001
From: Bartosz Golaszewski <[email protected]>
Date: Thu, 4 Dec 2025 10:44:12 +0100
Subject: [PATCH] reset: gpio: suppress bind attributes in sysfs

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")
---
 drivers/reset/reset-gpio.c | 1 +
 1 file changed, 1 insertion(+)
drivers/reset/reset-gpio.c +1 -0
index e5512b3b596b5..626c4c639c155 100644
@@ -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);
Signature · 1 line
2.51.0