aboutsummaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorOleg Nesterov <[email protected]>2007-07-02 12:26:20 -0300
committerMauro Carvalho Chehab <[email protected]>2007-07-03 15:11:19 -0300
commit1e4597e8f0049dccedb0e011934007309fa2aeab (patch)
tree74e8413d6bd1c5202fb3767ce18ae22fae235a25 /include/linux
parentf057131fb6eb2c45f6023e3da41ccd6e4e71aee9 (diff)
V4L/DVB (5818): CinergyT2: fix flush_workqueue() vs work->func() deadlock
Spotted and tested by Thomas Sattler <[email protected]>. 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 <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions