diff options
author | Andrew Morton <akpm@linux-foundation.org> | 2007-05-26 06:54:21 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-06-08 07:21:12 -0400 |
commit | ffeb9ec72e18e16d0b0835d959cdf01650758638 (patch) | |
tree | 5419b16dbf2e31447f5f2ae66fa07be3427a2dec /drivers/media/dvb/cinergyT2/cinergyT2.c | |
parent | 624fc7f52b48f69fd9d1fe7a594c211762c89825 (diff) |
V4L/DVB (5699): Cinergyt2: fix file release handler
If this mutex_lock_interruptible() does fail due to signal_pending() then the
state of the driver will get trashed in interesting ways, because userspace
cannot and will not retry the close().
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/dvb/cinergyT2/cinergyT2.c')
-rw-r--r-- | drivers/media/dvb/cinergyT2/cinergyT2.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/media/dvb/cinergyT2/cinergyT2.c b/drivers/media/dvb/cinergyT2/cinergyT2.c index 34d7abc900d7..6aba5b39ed14 100644 --- a/drivers/media/dvb/cinergyT2/cinergyT2.c +++ b/drivers/media/dvb/cinergyT2/cinergyT2.c | |||
@@ -519,8 +519,7 @@ static int cinergyt2_release (struct inode *inode, struct file *file) | |||
519 | struct dvb_device *dvbdev = file->private_data; | 519 | struct dvb_device *dvbdev = file->private_data; |
520 | struct cinergyt2 *cinergyt2 = dvbdev->priv; | 520 | struct cinergyt2 *cinergyt2 = dvbdev->priv; |
521 | 521 | ||
522 | if (mutex_lock_interruptible(&cinergyt2->sem)) | 522 | mutex_lock(&cinergyt2->sem); |
523 | return -ERESTARTSYS; | ||
524 | 523 | ||
525 | if (!cinergyt2->disconnect_pending && (file->f_flags & O_ACCMODE) != O_RDONLY) { | 524 | if (!cinergyt2->disconnect_pending && (file->f_flags & O_ACCMODE) != O_RDONLY) { |
526 | cancel_delayed_work(&cinergyt2->query_work); | 525 | cancel_delayed_work(&cinergyt2->query_work); |