msm: kgsl: Avoid race conditions with GPU halt variable
1. Take the device mutex before we check for GPU halt.
It's quite possible that after checking gpu halt this
thread might be preempted by kernel, other thread can
update the gpu halt. This will lead to a situation
where other thread has requested to stop sending cmds
and this thread might be sending cmds to ringbuffer.
2. Handle multiple threads changing the halt variable.
It's possible that one thread has set the halt value
and other thread clears that value.
3. init_completion() cannot be used to reinitialize
completion when reusing completion object,
INIT_COMPLETION macro should be used instead.
CRs-Fixed: 667179
Change-Id: Ie41c69be35bfd3ca14f3ce782ab45efb70aaf46a
Signed-off-by:
Prakash Kamliya <pkamliya@codeaurora.org>
Loading
Please register or sign in to comment