[linux-dvb] A dvb-core code problem
CityK
cityk at rogers.com
Mon Feb 16 00:45:17 CET 2009
Zhang Xiaobing wrote:
> 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.
Hi Zhang, could you post a patch to the linux-media mail list; for
general info see here:
http://www.linuxtv.org/wiki/index.php/Development:_How_to_submit_patches
More information about the linux-dvb
mailing list