diff options
| author | Tarun Karra <tkarra@codeaurora.org> | 2015-10-22 12:22:08 -0700 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-23 21:14:52 -0700 |
| commit | 1757ab898b49d68cad7082a962bb9a114f4e3aba (patch) | |
| tree | 5637b76140b78034dbc41973ea3642e90cf73f96 /include/linux/stackprotector.h | |
| parent | 880488a33629c6ccf16355ee888facc013d5b7b0 (diff) | |
msm: kgsl: Prevent deadlock in cmdbatch timer
Dispatcher can acquire drawctxt->lock if context is pending
and the fence it is waiting on just got signalled.
Dispatcher acquires drawctxt->lock and tries to delete the
cmdbatch timer using delete_timer_sync(). Delete_timer_sync()
waits till timer and its pending handlers are deleted.
But if the timer expires at the same time, timer handler
could be waiting on drawctxt->lock leading to a
deadlock. To prevent this use spin_trylock_bh() instead of
spin_lock_bh(). spin_trylock_bh() does not wait for the lock
if it does not get it and allows the timer handler to finish.
This prevents the deadlock.
Change-Id: Ic2344fed5fccb581b58ec0b66b45ba68af9f1459
Signed-off-by: Tarun Karra <tkarra@codeaurora.org>
Diffstat (limited to 'include/linux/stackprotector.h')
0 files changed, 0 insertions, 0 deletions
