1
linux/drivers/media/dvb/dvb-core
Devin Heitmueller 57594a586f V4L/DVB (11785): dvb_frontend: fix race condition resulting in dropped tuning commands
A race condition was detected in the case that putting the tuner to sleep takes
an unusually long period of time, combined with applications that quickly
close/open the dvb frontend.

The kaffeine channel scanner closes and reopens the dvb frontend between each
tuning attempt.  If it takes an unusually longer period of time to put the
tuner to sleep (for example, the Pinnacle 801e takes 660 ms), the dvb_frontend
thread will still be in a running state (and hence fepriv->thread is still set)
but the fepriv->exit field will still be zero.  As a result, if a
dvb_frontend_start() call arrives while the frontend thread is in the process
of terminating, the call will return 0 without actually starting a new thread.
This results in the tuning request being dropped.

To address this, mark fepriv->exit as soon as we know the thread is going to
be terminated, so that dvb_frontend_start() knows to start a new instance.

Problem encountered with Kaffeine 0.8.7 doing ATSC scanning against the
Pinnacle 801e tuner, in conjunction with new code to power down the xc5000
when not in use.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16 19:14:14 -03:00
..
demux.h
dmxdev.c V4L/DVB (11841): core: fix potential mutex_unlock without mutex_lock in dvb_dvr_read 2009-06-16 18:21:10 -03:00
dmxdev.h
dvb_ca_en50221.c V4L/DVB (10391): dvb: constify VFTs 2009-03-30 12:42:34 -03:00
dvb_ca_en50221.h V4L/DVB (9054): implement proper locking in the dvb ca en50221 driver 2009-01-29 08:35:37 -02:00
dvb_demux.c V4L/DVB (11930): TS continuity check: show error message when discontinuity detected or TEI flag detected in header 2009-06-16 19:07:23 -03:00
dvb_demux.h V4L/DVB (11930): TS continuity check: show error message when discontinuity detected or TEI flag detected in header 2009-06-16 19:07:23 -03:00
dvb_filter.c
dvb_filter.h
dvb_frontend.c V4L/DVB (11785): dvb_frontend: fix race condition resulting in dropped tuning commands 2009-06-16 19:14:14 -03:00
dvb_frontend.h
dvb_math.c
dvb_math.h
dvb_net.c V4L/DVB (10391): dvb: constify VFTs 2009-03-30 12:42:34 -03:00
dvb_net.h
dvb_ringbuffer.c
dvb_ringbuffer.h
dvbdev.c V4L/DVB (10391): dvb: constify VFTs 2009-03-30 12:42:34 -03:00
dvbdev.h V4L/DVB (10391): dvb: constify VFTs 2009-03-30 12:42:34 -03:00
Makefile