lkml.org 
[lkml]   [2005]   [Sep]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch] Make epoll_wait() handle negative timeouts as MAX_SCHEDULE_TIMEOUT ...

As reported by Vadim Lobanov, epoll_wait() did not handle correctly
timeouts <0 (only the -1 case was MAX_SCHEDULE_TIMEOUT'd).


Signed-off-by: Davide Libenzi <davidel@xmailserver.org>


- Davide
--- a/fs/eventpoll.c 2005-09-23 10:06:45.000000000 -0700
+++ b/fs/eventpoll.c 2005-09-23 10:09:35.000000000 -0700
@@ -1507,7 +1507,7 @@
* and the overflow condition. The passed timeout is in milliseconds,
* that why (t * HZ) / 1000.
*/
- jtimeout = timeout == -1 || timeout > (MAX_SCHEDULE_TIMEOUT - 1000) / HZ ?
+ jtimeout = timeout < 0 || timeout > (MAX_SCHEDULE_TIMEOUT - 1000) / HZ ?
MAX_SCHEDULE_TIMEOUT: (timeout * HZ + 999) / 1000;

retry:
\
 
 \ /
  Last update: 2005-09-23 19:37    [W:0.065 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site