remarkable-linux/include
Thomas Gleixner 96dd7421a0 [PATCH] prevent timespec/timeval to ktime_t overflow
Frank v.  Waveren pointed out that on 64bit machines the timespec to
ktime_t conversion might overflow.  This is also true for timeval to
ktime_t conversions.  This breaks a "sleep inf" on 64bit machines.

While a timespec/timeval with tx.sec = MAX_LONG is valid by specification
the internal representation of ktime_t is based on nanoseconds.  The
conversion of seconds to nanoseconds overflows for seconds values >=
(MAX_LONG / NSEC_PER_SEC).

Check the seconds argument to the conversion and limit it to the maximum
time which can be represented by ktime_t.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Frank v Waveren <fvw@var.cx>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-06 11:00:02 -07:00
..
acpi
asm-alpha [PATCH] remove set_wmb - arch removal 2006-07-14 21:56:14 -07:00
asm-arm [ARM] 3762/1: Fix ptrace cache coherency bug for ARM1136 VIPT nonaliasing Harvard caches 2006-09-02 18:43:20 +01:00
asm-arm26 [PATCH] remove set_wmb - arch removal 2006-07-14 21:56:14 -07:00
asm-cris [PATCH] remove set_wmb - arch removal 2006-07-14 21:56:14 -07:00
asm-frv [PATCH] remove set_wmb - arch removal 2006-07-14 21:56:14 -07:00
asm-generic [PATCH] hdrinstall: remove asm/io.h from user visibility 2006-07-14 21:53:52 -07:00
asm-h8300 [PATCH] remove set_wmb - arch removal 2006-07-14 21:56:14 -07:00
asm-i386 [PATCH] x86: increase MAX_MP_BUSSES on default arch 2006-09-01 11:39:08 -07:00
asm-ia64 [IA64] remove redundant local_irq_save() calls from sn_sal.h 2006-08-29 10:17:21 -07:00
asm-m32r [PATCH] remove set_wmb - arch removal 2006-07-14 21:56:14 -07:00
asm-m68k [SPARC]: Kill prom_getname, unused and not implemented properly. 2006-07-21 14:17:55 -07:00
asm-m68knommu [PATCH] remove set_wmb - arch removal 2006-07-14 21:56:14 -07:00
asm-mips [PATCH] remove set_wmb - arch removal 2006-07-14 21:56:14 -07:00
asm-parisc [PATCH] remove set_wmb - arch removal 2006-07-14 21:56:14 -07:00
asm-powerpc [PATCH] ppc32: fix last_jiffy time comparison 2006-08-30 21:21:55 -07:00
asm-ppc [PATCH] ppc32: board-specific part of fs_enet update 2006-08-19 17:44:31 -04:00
asm-s390 [S390] get_clock inline assembly. 2006-07-17 16:09:42 +02:00
asm-sh [PATCH] remove set_wmb - arch removal 2006-07-14 21:56:14 -07:00
asm-sh64 [PATCH] remove set_wmb - arch removal 2006-07-14 21:56:14 -07:00
asm-sparc [SPARC]: Fix SA_STATIC_ALLOC value. 2006-07-24 22:34:00 -07:00
asm-sparc64 [SPARC64]: Fix pfn_pte() build failure. 2006-08-22 14:35:40 -07:00
asm-um
asm-v850 [PATCH] remove set_wmb - arch removal 2006-07-14 21:56:14 -07:00
asm-x86_64 [PATCH] x86_64: Save original IST values for checking stack addresses 2006-08-30 16:05:16 -07:00
asm-xtensa [PATCH] remove set_wmb - arch removal 2006-07-14 21:56:14 -07:00
keys
linux [PATCH] prevent timespec/timeval to ktime_t overflow 2006-09-06 11:00:02 -07:00
math-emu
media V4L/DVB (4340): Videodev.h should be included also when V4L1_COMPAT is selected. 2006-08-08 13:54:12 -03:00
mtd
net Fix sctp privilege elevation (CVE-2006-3745) 2006-08-22 12:52:23 -07:00
pcmcia
rdma IB/mad: Validate MADs for spec compliance 2006-07-24 09:18:07 -07:00
rxrpc
scsi [SCSI] iscsi bugfixes: reduce memory allocations 2006-07-28 11:49:34 -05:00
sound
video [PATCH] mbxfb: Add framebuffer driver for the Intel 2700G 2006-07-14 21:53:55 -07:00
Kbuild