Re: [PATCH] dvb-core: Fix potential mutex_unlock without mutex_lock in dvb_dvr_read

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 30 Apr 2009 22:42:06 +0100
Simon Arlott <simon@xxxxxxxxxxx> wrote:

> >> diff --git a/drivers/media/dvb/dvb-core/dmxdev.c b/drivers/media/dvb/dvb-core/dmxdev.c
> >> index c35fbb8..d6d098a 100644
> >> --- a/drivers/media/dvb/dvb-core/dmxdev.c
> >> +++ b/drivers/media/dvb/dvb-core/dmxdev.c
> >> @@ -247,7 +247,7 @@ static ssize_t dvb_dvr_read(struct file *file, char __user *buf, size_t count,
> >>  	int ret;
> >>  
> >>  	if (dmxdev->exit) {
> >> -		mutex_unlock(&dmxdev->mutex);
> >> +		//mutex_unlock(&dmxdev->mutex);
> >>  		return -ENODEV;
> >>  	}
> > 
> > Is there any value in retaining all the commented-out lock operations,
> > or can we zap 'em?
> 
> I'm assuming they should really be there - it's just not practical
> because the call to dvb_dmxdev_buffer_read is likely to block waiting
> for data.

well..  such infomation is much better communicated via a nice comment,
rather than mystery-dead-code?

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux