]> asedeno.scripts.mit.edu Git - linux.git/commit
[media] s5p-jpeg: fix recursive spinlock acquisition
authorAlexandre Courbot <acourbot@chromium.org>
Tue, 25 Apr 2017 06:19:43 +0000 (03:19 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Tue, 13 Jun 2017 16:56:49 +0000 (13:56 -0300)
commit17d716e9264c43f541eccbd5b7b11278b1fb65cb
tree8991d3d9e0b925c9c21a7c6c116f34da753eb30e
parent18726a349de262f5bf03fab73fc7c46e79e6c41e
[media] s5p-jpeg: fix recursive spinlock acquisition

v4l2_m2m_job_finish(), which is called from the interrupt handler with
slock acquired, can call the device_run() hook immediately if another
context was in the queue. This hook also acquires slock, resulting in
a deadlock for this scenario.

Fix this by releasing slock right before calling v4l2_m2m_job_finish().
This is safe to do as the state of the hardware cannot change before
v4l2_m2m_job_finish() is called anyway.

Signed-off-by: Alexandre Courbot <acourbot@chromium.org>
Acked-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/platform/s5p-jpeg/jpeg-core.c