lkml.org 
[lkml]   [1999]   [Jan]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectPATCH for 2.2-pre: poll timeout (was Re: Serious bug)
According to Jes Sorensen:
> schedule_timeout: wrong timeout value f3333335 from 00024c0e
>
> I looked up where address 00024c0e was, it turned out to be do_poll() in
> fs/select.c
> timeout = (timeout*HZ+999)/1000+1;
> which obviously overflows with a timeout like this. The resulting value
> in my case is 0xf3333335...

I agree with your analysis. I'm now running with the below patch.
(I decided to look into this because I use mutt. :-))

Index: fs/select.c
*************** asmlinkage int sys_poll(struct pollfd *
*** 335,339 ****
timeout = MAX_SCHEDULE_TIMEOUT;
else if (timeout)
! timeout = (timeout*HZ+999)/1000+1;

err = -ENOMEM;
--- 335,339 ----
timeout = MAX_SCHEDULE_TIMEOUT;
else if (timeout)
! timeout = ROUND_UP(timeout, 1000/HZ);

err = -ENOMEM;

--
Chip Salzenberg - a.k.a. - <chip@perlsupport.com>
"When do you work?" "Whenever I'm not busy."

-
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/

\
 
 \ /
  Last update: 2005-03-22 13:49    [W:0.054 / U:0.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site