Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[linux-dvb] Re: Poll problem with multiple PIDs
Johannes Stezenbach wrote:
>
> On Mon, Jun 17, 2002 at 11:18:53PM +0200, Klaus Schmidinger wrote:
> > --- dmxdev.c Mon Apr 1 10:59:46 2002
> > +++ dmxdev.c Sun Jun 16 11:02:38 2002
> > @@ -1048,6 +1048,9 @@
> > if (dmxdev->dvr_buffer.pread!=dmxdev->dvr_buffer.pwrite)
> > return (POLLIN | POLLRDNORM | POLLPRI);
> >
> > + if (dmxdev->dvr_buffer.error)
> > + return (POLLIN | POLLRDNORM | POLLPRI | POLLERR);
> > +
> > return 0;
> > } else
> > return (POLLOUT | POLLWRNORM | POLLPRI);
> >
> > Apparently it also has been adopted in the CVS driver today.
>
> While this code looks right, your error handling in x2.c is incomplete,
> since you don't check the result code / errno of read().
x2.c was just a little example to demonstrate the bug in the driver.
The fact is that in case of a buffer overflow the driver got into
a state where any further poll() calls did not return POLLIN any more.
Of course I do check the return value of read() in VDR ;-)
Klaus
--
_______________________________________________________________
Klaus Schmidinger Phone: +49-8635-6989-10
CadSoft Computer GmbH Fax: +49-8635-6989-40
Hofmark 2 Email: kls@cadsoft.de
D-84568 Pleiskirchen, Germany URL: www.cadsoft.de
_______________________________________________________________
--
Info:
To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe linux-dvb" as subject.
Home |
Main Index |
Thread Index