[linux-dvb] A dvb-core code problem
Zhang Xiaobing
xbzhang at telegentsystems.com
Fri Feb 13 04:23:01 CET 2009
I found a code problem in dvb-core when I was debugging with my dvb driver.
The code in dvb_dvr_release() file dmxdev.c
/* TODO */
dvbdev->users--;
if(*dvbdev->users== -1* && dmxdev->exit==1) {
fops_put(file->f_op);
file->f_op = NULL;
mutex_unlock(&dmxdev->mutex);
"dvbdev->users== -1" should be changed to "dvbdev->users== 1", otherwise
driver may block forever in dvb_dmxdev_release() where a wakeup
condition is "dvbdev->users== 1".
Here is the code in dvb_dmxdev_release().
if (dmxdev->dvr_dvbdev->users > 1) {
wait_event(dmxdev->dvr_dvbdev->wait_queue,
*dmxdev->dvr_dvbdev->users==1*);
}
I hope it is right to post this message here.
--
Xiaobing Zhang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.linuxtv.org/pipermail/linux-dvb/attachments/20090213/50bc7a1c/attachment.htm
More information about the linux-dvb
mailing list