From b20e6e31a05805d097c7306c626f58bc7389b4da Mon Sep 17 00:00:00 2001 From: Frode Isaksen Date: Sun, 25 Jun 2006 05:49:09 -0700 Subject: [PATCH] --- yaml --- r: 29800 b: refs/heads/master c: 04a3446c90137a473837288b04b517b19dc67a0d h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/select.c | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index d3a2b8831ab1..b6d74264b689 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 8bdd1d1250d55afe403ac4affa6ccc5f9e60468f +refs/heads/master: 04a3446c90137a473837288b04b517b19dc67a0d diff --git a/trunk/fs/select.c b/trunk/fs/select.c index 9c4f0f2604f1..33b72ba0f86f 100644 --- a/trunk/fs/select.c +++ b/trunk/fs/select.c @@ -746,9 +746,9 @@ int do_sys_poll(struct pollfd __user *ufds, unsigned int nfds, s64 *timeout) asmlinkage long sys_poll(struct pollfd __user *ufds, unsigned int nfds, long timeout_msecs) { - s64 timeout_jiffies = 0; + s64 timeout_jiffies; - if (timeout_msecs) { + if (timeout_msecs > 0) { #if HZ > 1000 /* We can only overflow if HZ > 1000 */ if (timeout_msecs / 1000 > (s64)0x7fffffffffffffffULL / (s64)HZ) @@ -756,6 +756,9 @@ asmlinkage long sys_poll(struct pollfd __user *ufds, unsigned int nfds, else #endif timeout_jiffies = msecs_to_jiffies(timeout_msecs); + } else { + /* Infinite (< 0) or no (0) timeout */ + timeout_jiffies = timeout_msecs; } return do_sys_poll(ufds, nfds, &timeout_jiffies);