Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 29800
b: refs/heads/master
c: 04a3446
h: refs/heads/master
v: v3
  • Loading branch information
Frode Isaksen authored and Linus Torvalds committed Jun 25, 2006
1 parent 49bdde7 commit b20e6e3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8bdd1d1250d55afe403ac4affa6ccc5f9e60468f
refs/heads/master: 04a3446c90137a473837288b04b517b19dc67a0d
7 changes: 5 additions & 2 deletions trunk/fs/select.c
Original file line number Diff line number Diff line change
Expand Up @@ -746,16 +746,19 @@ 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)
timeout_jiffies = -1;
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);
Expand Down

0 comments on commit b20e6e3

Please sign in to comment.