Mailing List archive

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

[linux-dvb] Re: Pinnacle PCTV



Hi Michael,

you are of course absolutely right on both accounts.

On Sat, Aug 24, 2002 at 04:23:35PM +0200, michael.smutka@ycn.com wrote:
> 
> Hi Peter
> 
> Finally I have managed to set up a second box for debugging
> (using kgdb.sourceforge.net).
> 
> By accidentally trying to tune a channel on high band with a LNB not
> capable of that I found the following crash:
Yes, I know that whenever the frontend loses sync, there is a chance that
the machine locks up. However, I believed this to be some kind of endless
loop with interrupts disabled. I noticed only recently that a kernel oops in
interrupt context was the real reason (Aieee, killing interrupt handler...).
...
> 
> The corresponding line is 
> 
>       /* are we frame synced? */
> -->   if(((unsigned char *)bt->buffer)[bt->readbuf*bt->framesize+bt->readptr]!=0x47) {
>          dprintk("pctv debug: tasklet: searching for sync\n");
> 
> The index readbuf * framesize + readptr is exactly allocbufsize, so
> you are tring to access unalloced memory (which fortunately is also
> unmapped so we get the SEGFAULT).
Yes. However, readptr should by design be always < framesize. So, I missed
to assert this at some place. Since readptr is only ever changed inside the
tasklet, I should be able to find this some day ;-)

> 
> Simply returning in this situation avoids the crash but i doubt this
> is the correct solution.
Right again. It should not be posible to happen in the first place. If it
happens, it should probably printk some intelligible message and release the
spin_lock before it returns. Alas, the whole sync/resync code is quite a
mess, I'll need to redesign it a little, I think. It may, however, take a
little while.

> 
> Cheers
> Michael
Thanks for finding this out.

Regards,
Peter
-- 
"Only wimps use tape backup: _real_ men just upload their important stuff
on ftp, and let the rest of the world mirror it ;)"
(Linus Torvalds, about his failing hard drive on linux.cs.helsinki.fi)


-- 
Info:
To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe linux-dvb" as subject.



Home | Main Index | Thread Index