A dvb-core code problem

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

 



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

_______________________________________________
linux-dvb users mailing list
For V4L/DVB development, please use instead linux-media@xxxxxxxxxxxxxxx
linux-dvb@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

[Index of Archives]     [Linux Media]     [Video 4 Linux]     [Asterisk]     [Samba]     [Xorg]     [Xfree86]     [Linux USB]

  Powered by Linux