[linux-dvb] USB driver dmxdev crash on disconnection
linuxtv at foft.fsnet.co.uk
Wed Mar 22 22:14:00 CET 2006
On Sunday 19 March 2006 19:42, Mark Watson wrote:
> First a bit of background. About a year and a half ago I built myself a PVR
> using a Cypress FX2 to feed an mpeg TS from a digibox. This has been
> working great except the FX2 disconnects every few weeks (possibly heat
> related, I've just fitted a heatsink...). I'm finally trying to get to the
> bottom of why it crashes when it disconnects, with the help of kgdb. I can
> generally reproduce this crash by unplugging with vdr is running.
> My driver source is available at:
> http://www.scrameta.net/skympeg/dvb_skympeg.c (Feeds a whole transponder
> from an already configured FX2, filters a bit and pumps it into the kernel
> dvb demux)
> http://www.scrameta.net/skympeg/dvb_skympeg_fe.c (Just a stub for fake
> tuning to allow vdr to work)
> In dvb_skympeg.c my cleanup code, called on usb disconnect, does something
> &dev->fe_hw); dev->dvb_demux.dmx.remove_frontend(&dev->dvb_demux.dmx,
> &dev->fe_mem); err("dvb_demux...");
> if (dev->dvb_frontend) dvb_unregister_frontend(dev->dvb_frontend);
> dev->dvb_frontend = 0;
> The problem occurs after it has logged "dvb_dmx_release". The crash is in
> dmxdev.c:983 (in 18.104.22.168 official) in dvb_demux_poll, as called by vdr.
> Now I can see why dmxdevfilter is invalid, since its been freed, but I'm
> not sure how to avoid this since I already called dvb_dmxdev_release. Do I
> need to check no-one is using the device before calling dvb_dmxdev_release?
> I do have an open count on my device (though I think thats for USB?), but
> no-one has it open. Sorry, not got much experience with device drivers on
> Hope someone can help.
> linux-dvb mailing list
> linux-dvb at linuxtv.org
Please help! Do I need to provide more information? I only really want to know
how I should be using the dvb_dmx_release. Presumably I need to check it is
not being used before calling, but can't work out what.
More information about the linux-dvb