summaryrefslogtreecommitdiff
path: root/linux/drivers/media/radio/dsbr100.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2007-07-02 12:26:20 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-07-02 12:26:20 -0300
commitfc035425e7b3d9c08a27b6860bf1b28abb1454cf (patch)
treeff50f0c93f2e07d589bea9df06903c57d7fa72c3 /linux/drivers/media/radio/dsbr100.c
parentfa157792a54335fad458fd24f6e9cbfa810ee9ca (diff)
downloadmediapointer-dvb-s2-fc035425e7b3d9c08a27b6860bf1b28abb1454cf.tar.gz
mediapointer-dvb-s2-fc035425e7b3d9c08a27b6860bf1b28abb1454cf.tar.bz2
cinergyT2: fix flush_workqueue() vs work->func() deadlock
From: Oleg Nesterov <oleg@tv-sign.ru> Spotted and tested by Thomas Sattler <tsattler@gmx.de>. cinergyT2.c does cancel_delayed_work() + flush_scheduled_work() while holding cinergyt2->sem. This leads to deadlock because work->func() needs the same mutex to complete. Another bug is that this code in fact can't reliably stop the re-arming delayed_work. Convert this code to use cancel_rearming_delayed_work() and move it out of ->sem. Another mutex, ->wq_sem, was added to protect against the concurrent open/resume. This patch is a horrible hack to fix the lockup which happens in practice. As Dmitry Torokhov pointed out this driver has other problems and needs further changes. Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media/radio/dsbr100.c')
0 files changed, 0 insertions, 0 deletions