From: Andrew Morton Date: Sat, 26 May 2007 10:54:21 +0000 (-0300) Subject: V4L/DVB (5699): Cinergyt2: fix file release handler X-Git-Tag: v2.6.22-rc5~53^2~9 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ffeb9ec72e18e16d0b0835d959cdf01650758638;p=linux-2.6 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 Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/dvb/cinergyT2/cinergyT2.c b/drivers/media/dvb/cinergyT2/cinergyT2.c index 34d7abc900..6aba5b39ed 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) struct dvb_device *dvbdev = file->private_data; struct cinergyt2 *cinergyt2 = dvbdev->priv; - if (mutex_lock_interruptible(&cinergyt2->sem)) - return -ERESTARTSYS; + mutex_lock(&cinergyt2->sem); if (!cinergyt2->disconnect_pending && (file->f_flags & O_ACCMODE) != O_RDONLY) { cancel_delayed_work(&cinergyt2->query_work);