summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorTzung-Bi Shih <tzungbi@kernel.org>2026-11-05 00:20:37 +0800
committerPhilipp Zabel <p.zabel@pengutronix.de>2026-11-05 11:59:22 +0100
commitf06482ceb314c8dc19f3d084b29c27af237556b5 (patch)
tree0e360313918221d432841c2084da38991c371f14 /tools/perf/scripts/python
parent168cae7e87463c34758db2b51537937a29b753f1 (diff)
reset: Fix reset_control leak when put after controller unregister
After commit 8c91302a29bc ("reset: protect struct reset_control with its own mutex"), reset_control_put_internal() returns early if `rcdev` is NULL. When a reset controller is unregistered while consumers still hold reset_control handles, reset_controller_unregister() sets `rstc->rcdev` to NULL. When consumers later release their handles via reset_control_put(), the early return skips kref_put(), resulting in leaking resources. Call kref_put() in reset_control_put_internal() even if `rcdev` is NULL. Fixes: 8c91302a29bc ("reset: protect struct reset_control with its own mutex") Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org> Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de> Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions