linux/drivers/media/cec
Hans Verkuil 288eceb085 media: cec-adap.c: don't use flush_scheduled_work()
For some inexplicable reason I decided to call flush_scheduled_work()
instead of cancel_delayed_work_sync(). The problem with that is that
flush_scheduled_work() waits for *all* queued scheduled work to be
completed instead of just the work itself.

This can cause a deadlock if a CEC driver also schedules work that
takes the same lock. See the comments for flush_scheduled_work() in
linux/workqueue.h.

This is exactly what has been observed a few times.

This patch simply replaces flush_scheduled_work() by
cancel_delayed_work_sync().

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Cc: <stable@vger.kernel.org>      # for v5.8 and up
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-09-10 14:05:10 +02:00
..
core media: cec-adap.c: don't use flush_scheduled_work() 2020-09-10 14:05:10 +02:00
i2c media: cec: i2c: ch7322: Add ch7322 CEC controller driver 2020-07-04 12:16:18 +02:00
platform media: cros-ec-cec: do not bail on device_init_wakeup failure 2020-07-04 12:45:45 +02:00
usb media updates for v5.8-rc1 2020-06-03 20:59:38 -07:00
Kconfig media: cec: i2c: ch7322: Add ch7322 CEC controller driver 2020-07-04 12:16:18 +02:00
Makefile media: cec: i2c: ch7322: Add ch7322 CEC controller driver 2020-07-04 12:16:18 +02:00