[linux-dvb] [patch] fix two minor issues in dvb_core

Johannes Stezenbach js at linuxtv.org
Mon Jun 6 16:44:48 CEST 2005


On Sat, Jun 04, 2005 at 09:48:13PM +0200, Peter Beutner wrote:
> i recently stumbled over these two little bugs in the dvb_core code:
> 1.
> As the FE_SET_FRONTEND ioctl is asynchronous it is not guaranteed that 
> the tuner is already reconfigured when the next ioctl occurs. In case of 
> the FE_READ_STATUS ioctl this would return the signal status of the 
> previous,now obsolete tuning to the user. Which is kind of bad for apps 
> which do something like:
> tune();
> while(!has_lock())
>     sleep(500);
> read_data();
> Prevent this by automatically returning zero if frontend state is FE_RETUNE.

Hm, nice catch. Did you actually manage to hit this race?

> 2.
> In dvb_dmxdev_filter_start if we go out because of an error, release 
> previously allocated demux_feed.

This is a bit subtle. The feed is released in dvb_demux_release() (when
the device is closed). What was the problem you were trying to fix with
this patch?


Thanks,
Johannes




More information about the linux-dvb mailing list