On 04/12/2025 10:44, Bartosz Golaszewski wrote:
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
Not forever. If every consumer is unloaded, this can be unloaded too, no?
it and the actual reset consumer. Suppress sysfs bind attributes so that
With that reasoning every reset consumer should have suppress binds. Devlink should be created by reset controller framework so it is not this driver's fault.
git grep suppress_bind_attrs -- drivers/reset/
gives only few of such controllers.
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")
Nothing to be fixed here, unless you claim that every reset provider is broken as well? What is exactly different in handling devlinks between this driver and every other reset provider?
Cc: stable@vger.kernel.org Signed-off-by: Bartosz Golaszewski bartosz.golaszewski@oss.qualcomm.com
Best regards, Krzysztof