Files
kernel/include/linux
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-02 12:23:12 +00:00
2006-01-18 19:20:24 -08:00
2006-01-13 16:29:56 -08:00
2006-01-13 09:12:21 -08:00
2006-02-03 08:32:00 -08:00
2006-02-11 21:41:11 -08:00
2006-01-08 20:14:02 -08:00
2006-01-14 18:27:10 -08:00
2006-01-08 20:13:49 -08:00
2006-01-18 19:20:29 -08:00
2006-01-14 18:27:09 -08:00
2006-02-01 08:53:13 -08:00
2006-02-08 01:03:52 -05:00
2006-02-07 20:56:35 -05:00
2006-02-10 08:13:12 -08:00
2006-02-07 16:12:33 -08:00
2006-01-08 20:13:46 -08:00
2006-01-18 19:20:29 -08:00
2006-01-14 18:27:12 -08:00
2006-02-09 16:43:38 -08:00
2006-01-15 02:12:54 +01:00
2006-01-10 08:01:42 -08:00
2006-01-08 20:14:02 -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:13:45 -08:00
2006-02-11 21:41:10 -08:00
2006-02-11 21:41:11 -08: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-01-08 20:12:40 -08:00
2006-01-10 08:01:57 -08:00