android_kernel_xiaomi_sm8350/include
Thomas Gleixner c08b8a4910 [PATCH] sys_alarm() unsigned signed conversion fixup
alarm() calls the kernel with an unsigend int timeout in seconds.  The
value is stored in the tv_sec field of a struct timeval to setup the
itimer.  The tv_sec field of struct timeval is of type long, which causes
the tv_sec value to be negative on 32 bit machines if seconds > INT_MAX.

Before the hrtimer merge (pre 2.6.16) such a negative value was converted
to the maximum jiffies timeout by the timeval_to_jiffies conversion.  It's
not clear whether this was intended or just happened to be done by the
timeval_to_jiffies code.

hrtimers expect a timeval in canonical form and treat a negative timeout as
already expired.  This breaks the legitimate usage of alarm() with a
timeout value > INT_MAX seconds.

For 32 bit machines it is therefor necessary to limit the internal seconds
value to avoid API breakage.  Instead of doing this in all implementations
of sys_alarm the duplicated sys_alarm code is moved into a common function
in itimer.c

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-25 08:22:48 -08:00
..
acpi [PATCH] s/;;/;/g 2006-03-24 07:33:24 -08:00
asm-alpha [PATCH] remove ISA legacy functions: remove the helpers 2006-03-24 07:33:19 -08:00
asm-arm [PATCH] AT91RM9200 Ethernet driver 2006-03-24 12:10:55 -05:00
asm-arm26 [PATCH] add asm-generic/mman.h 2006-02-15 15:32:22 -08:00
asm-cris [PATCH] kill include/linux/platform.h, default_idle() cleanup 2006-03-24 07:33:21 -08:00
asm-frv [PATCH] add asm-generic/mman.h 2006-02-15 15:32:22 -08:00
asm-generic [PATCH] more for_each_cpu() conversions 2006-03-23 07:38:17 -08:00
asm-h8300 [PATCH] add asm-generic/mman.h 2006-02-15 15:32:22 -08:00
asm-i386 [PATCH] kill include/linux/platform.h, default_idle() cleanup 2006-03-24 07:33:21 -08:00
asm-ia64 [PATCH] abstract type/size specification for assembly 2006-03-24 07:33:25 -08:00
asm-m32r [PATCH] m32r: fix and update for gcc-4.0 2006-02-24 14:31:36 -08:00
asm-m68k [PATCH] atomic: add_unless cmpxchg optimise 2006-03-23 07:38:17 -08:00
asm-m68knommu [PATCH] m68knommu: hardirq.h needs definition of NR_IRQS 2006-02-07 16:16:54 -08:00
asm-mips [PATCH] abstract type/size specification for assembly 2006-03-24 07:33:25 -08:00
asm-parisc [PATCH] remove ISA legacy functions: remove the helpers 2006-03-24 07:33:19 -08:00
asm-powerpc [PATCH] more for_each_cpu() conversions 2006-03-23 07:38:17 -08:00
asm-ppc powerpc: Implement accurate task and CPU time accounting 2006-02-24 14:05:56 +11:00
asm-s390 [PATCH] s390: BUG() warnings 2006-03-24 07:33:16 -08:00
asm-sh [PATCH] remove ISA legacy functions: remove the helpers 2006-03-24 07:33:19 -08:00
asm-sh64 [PATCH] mm: remove set_pgdir leftovers 2006-03-22 07:53:56 -08:00
asm-sparc [SPARC]: Respect vm_page_prot in io_remap_page_range(). 2006-03-22 01:15:13 -08:00
asm-sparc64 [PATCH] more for_each_cpu() conversions 2006-03-23 07:38:17 -08:00
asm-um [PATCH] x86: SMP alternatives 2006-03-23 07:38:04 -08:00
asm-v850 [PATCH] abstract type/size specification for assembly 2006-03-24 07:33:25 -08:00
asm-x86_64 [PATCH] remove ISA legacy functions: remove the helpers 2006-03-24 07:33:19 -08:00
asm-xtensa [PATCH] add asm-generic/mman.h 2006-02-15 15:32:22 -08:00
keys
linux [PATCH] sys_alarm() unsigned signed conversion fixup 2006-03-25 08:22:48 -08:00
math-emu
media V4L/DVB (3513): Remove saa711x driver 2006-03-21 08:53:40 -08:00
mtd
net Merge branch 'upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 2006-03-23 17:15:41 -05:00
pcmcia [PATCH] pcmcia: Add macro to match PCMCIA cards by numeric ID and first vendor string 2006-03-01 11:11:26 +01:00
rdma IB/umad: Add support for large RMPP transfers 2006-03-20 10:08:23 -08:00
rxrpc
scsi [PATCH] Make libata not powerdown drivers on PM_EVENT_FREEZE. 2006-03-24 09:51:36 -05:00
sound [PATCH] sound: remove PC98-specific OPL3_HW_OPL3_PC98 2006-03-24 07:33:26 -08:00
video [PATCH] neofb: avoid resetting display config on unblank (v2) 2006-02-15 15:32:21 -08:00