Quoting Stephen Boyd (2019-04-12 11:31:42)
> We recently introduced a change to support devm clk lookups. That change
> introduced a code-path that used clk_find() without holding the
> 'clocks_mutex'. Unfortunately, clk_find() iterates over the 'clocks'
> list and so we need to prevent the list from being modified at the same
> time. Do this by holding the mutex and checking to make sure it's held
> while iterating the list.
> 
> Note, we don't really care if the lookup is freed after we find it with
> clk_find() because we're just doing a pointer comparison, but if we did
> care we would need to keep holding the mutex while we dereference the
> clk_lookup pointer.
> 
> Fixes: 3eee6c7d119c ("clkdev: add managed clkdev lookup registration")
> Cc: Miquel Raynal <[email protected]>
> Cc: Jerome Brunet <[email protected]>
> Cc: Russell King <[email protected]>
> Cc: Michael Turquette <[email protected]>
> Cc: Jeffrey Hugo <[email protected]>
> Cc: Chen-Yu Tsai <[email protected]>
> Cc: Matti Vaittinen <[email protected]>
> Signed-off-by: Stephen Boyd <[email protected]>
> ---

Applied to clk-fixes

Reply via email to