diff options
author | David Lechner <[email protected]> | 2018-01-04 19:46:08 -0600 |
---|---|---|
committer | Stephen Boyd <[email protected]> | 2018-01-10 13:39:31 -0800 |
commit | a12aa8a68dfef5de181f2e555aa950a0ab05411f (patch) | |
tree | f2faf66b671c503e15028be86a07e70f63767f96 /net/unix/sysctl_net_unix.c | |
parent | 4fbd8d194f06c8a3fd2af1ce560ddb31f7ec8323 (diff) |
clk: fix reentrancy of clk_enable() on UP systems
Reentrant calls to clk_enable() are not working on UP systems. This is
caused by the fact spin_trylock_irqsave() always returns true when
CONFIG_SMP=n (and CONFIG_DEBUG_SPINLOCK=n) which causes the reference
counting to not work correctly when clk_enable_lock() is called twice
before clk_enable_unlock() is called (this happens when clk_enable()
is called from within another clk_enable()).
This fixes the problem by skipping the call to spin_trylock_irqsave() on UP
systems and relying solely on reference counting. We also make sure to set
flags in this case so that we are not returning an uninitialized value.
Suggested-by: Stephen Boyd <[email protected]>
Signed-off-by: David Lechner <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
Diffstat (limited to 'net/unix/sysctl_net_unix.c')
0 files changed, 0 insertions, 0 deletions