mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-28 21:33:52 +00:00
clk: Remove prepare_lock hold assertion in __clk_release()
[ Upstream commit8358a76cfb
] Removing this assertion lets us move the kref_put() call outside the prepare_lock section. We don't need to hold the prepare_lock here to free memory and destroy the clk_core structure. We've already unlinked the clk from the clk tree and by the time the release function runs nothing holds a reference to the clk_core anymore so anything with the pointer can't access the memory that's being freed anyway. Way back in commit496eadf821
("clk: Use lockdep asserts to find missing hold of prepare_lock") we didn't need to have this assertion either. Fixes:496eadf821
("clk: Use lockdep asserts to find missing hold of prepare_lock") Cc: Krzysztof Kozlowski <krzk@kernel.org> Reviewed-by: Douglas Anderson <dianders@chromium.org> Signed-off-by: Stephen Boyd <sboyd@kernel.org> Link: https://lore.kernel.org/r/20240325184204.745706-2-sboyd@kernel.org Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
d0d04efa2e
commit
02a516cbda
1 changed files with 0 additions and 2 deletions
|
@ -4313,8 +4313,6 @@ static void __clk_release(struct kref *ref)
|
|||
{
|
||||
struct clk_core *core = container_of(ref, struct clk_core, ref);
|
||||
|
||||
lockdep_assert_held(&prepare_lock);
|
||||
|
||||
clk_core_free_parent_map(core);
|
||||
kfree_const(core->name);
|
||||
kfree(core);
|
||||
|
|
Loading…
Reference in a new issue