* [linux-dvb] A dvb-core code problem
@ 2009-02-13 3:23 Zhang Xiaobing
2009-02-15 23:45 ` CityK
0 siblings, 1 reply; 2+ messages in thread
From: Zhang Xiaobing @ 2009-02-13 3:23 UTC (permalink / raw)
To: linux-dvb
[-- Attachment #1.1: Type: text/plain, Size: 724 bytes --]
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
[-- Attachment #1.2: Type: text/html, Size: 1791 bytes --]
[-- Attachment #2: Type: text/plain, Size: 228 bytes --]
_______________________________________________
linux-dvb users mailing list
For V4L/DVB development, please use instead linux-media@vger.kernel.org
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [linux-dvb] A dvb-core code problem
2009-02-13 3:23 [linux-dvb] A dvb-core code problem Zhang Xiaobing
@ 2009-02-15 23:45 ` CityK
0 siblings, 0 replies; 2+ messages in thread
From: CityK @ 2009-02-15 23:45 UTC (permalink / raw)
To: linux-media; +Cc: linux-dvb
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-02-15 23:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-13 3:23 [linux-dvb] A dvb-core code problem Zhang Xiaobing
2009-02-15 23:45 ` CityK
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox