OSDN Git Service

[media] s5p-mfc: Don't crash the kernel if the watchdog kicks in
authorPawel Osciak <posciak@chromium.org>
Tue, 21 Oct 2014 11:07:01 +0000 (08:07 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Tue, 28 Oct 2014 17:50:33 +0000 (15:50 -0200)
commit9a7bc6b0c456bdc642269659fb13f29a8c13815b
tree6868dd6da411436b2ac64c312c1c6bdd54d2658f
parent5932f74a116cf14b69b9b3e23dcaf8698151976e
[media] s5p-mfc: Don't crash the kernel if the watchdog kicks in

If the software watchdog kicks in, the watchdog worker is not synchronized
with hardware interrupts and does not block other instances. It's possible
for it to clear the hw_lock, making other instances trigger a BUG() on
hw_lock checks. Since it's not fatal to clear the hw_lock to zero twice,
just WARN in those cases for now. We should not explode, as firmware will
return errors as needed for other instances after it's reloaded, or they
will time out.

A clean fix should involve killing other instances when watchdog kicks in,
but requires a major redesign of locking in the driver.

Signed-off-by: Pawel Osciak <posciak@chromium.org>
Signed-off-by: Kiran AVND <avnd.kiran@samsung.com>
Signed-off-by: Arun Kumar K <arun.kk@samsung.com>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/platform/s5p-mfc/s5p_mfc.c