Re: Funky errors

Philipp Rumpf (prumpf@jcsbs.lanobis.de)
Wed, 25 Nov 1998 05:55:13 +0100


On Tue, Nov 24, 1998 at 10:45:11PM -0500, Wesley Morgan wrote:
> On Sat, 21 Nov 1998, Philipp Rumpf wrote:
>
> > On Fri, Nov 20, 1998 at 06:35:02PM -0500, Wesley Morgan wrote:
> > > I had the pleasure of my console being flooded with the following
> > > messages. I am fairly certain they occurred as a result of some test
> > > performed by the egcs testsuite (cvs tree). If not that, then it may be a
> > > ppp related problem...
> > >
> > > Nov 20 18:11:06 by-tor kernel: schedule_timeout: wrong timeout value ffffff9c from c012b9b1
> >
> > (cat /System.map; echo c012b9b1 MAGICMAGIC) | sort | grep -3 MAGICMAGIC
>
> Here are the results... A problem with select/poll?? hrmph... Good luck :)
>
> c012b928 T do_select

do_select is called by sys_select, which does not check if it's argument is in
the correct range. I propose the following change:

--- fs/select.c.orig Wed Nov 25 05:50:27 1998
+++ fs/select.c Wed Nov 25 05:52:24 1998
@@ -227,6 +227,8 @@
if (!fds)
goto out_nofds;
ret = -EINVAL;
+ if (timeout < 0)
+ goto out;
if (n < 0)
goto out;
if (n > KFDS_NR)

I do not know if it would be better just to return if timeout is < 0. What does
POSIX say ?

Philipp Rumpf

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/