Skip to content

Commit 16de4c6

Browse files
Bartosz GolaszewskipH5
authored andcommitted
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: cee544a ("reset: gpio: Add GPIO-based reset controller") Cc: stable@vger.kernel.org Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
1 parent b3d8508 commit 16de4c6

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

drivers/reset/reset-gpio.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ static struct auxiliary_driver reset_gpio_driver = {
111111
.id_table = reset_gpio_ids,
112112
.driver = {
113113
.name = "reset-gpio",
114+
.suppress_bind_attrs = true,
114115
},
115116
};
116117
module_auxiliary_driver(reset_gpio_driver);

0 commit comments

Comments
 (0)