Andrew Morton
643a654540
[PATCH] select: fix returned timeval
...
With David Woodhouse <dwmw2@infradead.org >
select() presently has a habit of increasing the value of the user's
`timeout' argument on return.
We were writing back a timeout larger than the original. We _deliberately_
round up, since we know we must wait at _least_ as long as the caller asks
us to.
The patch adds a couple of helper functions for magnitude comparison of
timespecs and of timevals, and uses them to prevent the various poll and
select functions from returning a timeout which is larger than the one which
was passed in.
The patch also fixes a bug in compat_sys_pselect7(): it was adding the new
timeout value to the old one and was returning that. It should just return
the new timeout value.
(We have various handy timespec/timeval-to-from-nsec conversion functions in
time.h. But this code open-codes it all).
Cc: "David S. Miller" <davem@davemloft.net >
Cc: Andi Kleen <ak@muc.de >
Cc: Ulrich Drepper <drepper@redhat.com >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: george anzinger <george@mvista.com >
Signed-off-by: Andrew Morton <akpm@osdl.org >
Signed-off-by: Linus Torvalds <torvalds@osdl.org >
2006-02-11 21:41:11 -08:00
..
2006-01-08 20:14:02 -08:00
2006-02-07 20:58:50 -05:00
2006-02-01 12:52:23 -05:00
2006-02-02 12:23:12 +00:00
2006-02-07 20:56:35 -05:00
2006-01-20 11:57:07 -08:00
2006-01-12 14:06:43 -08:00
2006-02-04 23:51:28 -08:00
2006-02-04 23:51:28 -08:00
2006-01-18 19:20:24 -08:00
2006-01-13 16:29:56 -08:00
2006-02-01 12:52:25 -05:00
2006-01-16 20:53:46 -08:00
2006-01-08 20:14:03 -08:00
2006-01-08 20:14:07 -08:00
2006-01-13 09:12:21 -08:00
2006-02-03 08:32:00 -08:00
2006-01-24 10:06:19 +01:00
2006-01-08 20:13:47 -08:00
2006-01-10 20:35:03 -05:00
2006-01-10 08:01:35 -08:00
2006-01-11 18:42:13 -08:00
2006-01-10 08:01:33 -08:00
2006-02-11 21:41:11 -08:00
2006-01-14 18:27:15 -08:00
2006-01-14 18:27:16 -08:00
2006-01-10 08:32:35 -08:00
2006-01-08 20:14:02 -08:00
2006-02-03 14:01:05 -08:00
2006-01-18 13:53:45 -08:00
2006-02-10 08:13:12 -08:00
2006-01-14 18:27:10 -08:00
2006-01-09 14:15:37 -08:00
2006-01-08 20:14:07 -08:00
2006-02-07 20:56:35 -05:00
2006-02-01 08:53:11 -08:00
2006-01-13 11:26:04 -08:00
2006-01-11 19:04:51 -08:00
2006-02-08 07:52:58 -08:00
2006-01-08 20:13:49 -08:00
2006-02-03 08:32:09 -08:00
2006-01-09 15:59:24 -08:00
2006-01-14 18:27:15 -08:00
2006-01-18 19:20:29 -08:00
2006-02-01 08:53:17 -08:00
2006-01-12 16:31:52 -05:00
2006-02-01 08:53:09 -08:00
2006-01-11 19:04:51 -08:00
2006-01-14 18:27:09 -08:00
2006-02-01 08:53:13 -08:00
2006-01-15 09:02:44 -02:00
2006-02-06 12:02:14 -08:00
2006-02-03 08:32:07 -08:00
2006-02-03 08:32:12 -08:00
2006-01-18 00:45:15 +01:00
2006-01-08 20:14:07 -08:00
2006-01-16 23:18:35 -08:00
2006-01-09 16:03:03 +01:00
2006-02-01 08:53:13 -08:00
2006-02-08 01:03:52 -05:00
2006-01-08 20:14:07 -08:00
2006-01-10 08:02:01 -08:00
2006-02-07 20:56:35 -05:00
2006-01-09 15:59:24 -08:00
2006-01-10 08:01:35 -08:00
2006-02-10 08:13:12 -08:00
2006-01-24 17:52:48 -05:00
2006-02-10 08:13:12 -08:00
2006-01-08 20:13:53 -08:00
2006-01-08 20:13:53 -08:00
2006-01-11 18:42:12 -08:00
2006-02-01 08:53:13 -08:00
2006-01-17 19:37:45 -05:00
2006-02-03 08:32:02 -08:00
2006-01-09 15:59:27 -08:00
2006-01-18 19:20:18 -08:00
2006-01-18 19:20:17 -08:00
2006-02-07 16:12:33 -08:00
2006-02-01 08:53:15 -08:00
2006-01-10 08:01:34 -08:00
2006-01-08 20:13:46 -08:00
2006-01-11 08:14:16 -08:00
2006-01-11 08:14:16 -08:00
2006-01-18 19:20:29 -08:00
2006-02-07 16:12:34 -08:00
2006-01-14 18:27:12 -08:00
2006-01-08 20:14:07 -08:00
2006-01-10 12:54:29 -08:00
2006-02-09 16:43:38 -08:00
2006-02-07 20:56:35 -05:00
2006-01-08 20:13:52 -08:00
2006-02-03 08:32:05 -08:00
2006-02-08 21:46:24 +00:00
2006-01-31 18:00:11 -08:00
2006-01-08 20:13:59 -08:00
2006-01-15 02:12:54 +01:00
2006-01-12 16:31:52 -05:00
2006-01-09 15:59:24 -08:00
2006-02-05 11:06:52 -08:00
2006-01-09 15:47:16 +11:00
2006-01-18 19:20:30 -08:00
2006-02-01 08:53:13 -08:00
2006-01-13 21:02:13 +11:00
2006-01-08 20:14:04 -08:00
2006-02-03 08:32:08 -08:00
2006-01-08 20:13:48 -08:00
2006-01-12 11:35:15 -06:00
2006-02-03 08:32:09 -08:00
2006-02-05 11:06:52 -08:00
2006-02-01 08:53:25 -08:00
2006-02-01 08:53:25 -08:00
2006-02-01 08:53:25 -08:00
2006-01-08 20:13:51 -08:00
2006-01-10 08:01:53 -08:00
2006-02-01 08:53:16 -08:00
2006-01-08 20:13:47 -08:00
2006-02-09 16:17:36 -08:00
2006-01-10 08:01:42 -08:00
2006-01-08 20:14:07 -08:00
2006-01-08 20:14:02 -08:00
2006-02-03 18:31:33 -08:00
2006-01-21 23:03:28 +00:00
2006-01-21 23:03:28 +00:00
2006-01-14 18:27:07 -08:00
2006-01-08 20:13:53 -08:00
2006-01-17 02:54:21 -08:00
2006-02-01 08:53:18 -08:00
2006-01-14 18:27:13 -08:00
2006-02-07 20:56:35 -05:00
2006-01-12 14:06:31 -08:00
2006-01-08 20:14:02 -08:00
2006-02-07 16:12:33 -08:00
2006-02-01 08:53:17 -08:00
2006-01-08 20:13:45 -08:00
2006-02-11 21:41:10 -08:00
2006-02-01 08:53:16 -08:00
2006-02-11 21:41:11 -08:00
2006-01-10 08:01:38 -08:00
2006-01-18 00:45:15 +01:00
2006-01-12 14:06:38 -08:00
2006-01-18 19:20:17 -08:00
2006-02-10 08:13:12 -08:00
2006-01-10 08:01:59 -08:00
2006-02-10 08:13:12 -08:00
2006-02-01 08:53:13 -08:00
2006-02-03 08:32:04 -08:00
2006-02-03 08:32:05 -08:00
2006-01-31 17:23:44 -08:00
2006-01-09 15:32:31 -02:00
2006-02-08 01:03:39 -05:00
2006-01-08 20:14:07 -08:00
2006-01-08 20:12:40 -08:00
2006-01-08 20:13:47 -08:00
2006-01-10 08:01:29 -08:00
2006-01-10 08:01:57 -08:00