android_kernel_xiaomi_sm7250/arch/mips/kernel
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
..
asm-offsets.c
binfmt_elfn32.c [MIPS] jiffies_to_compat_timeval fix 2006-02-21 16:58:23 +00:00
binfmt_elfo32.c [MIPS] jiffies_to_compat_timeval fix 2006-02-21 16:58:23 +00:00
branch.c
cpu-bugs64.c
cpu-probe.c [MIPS] War on whitespace: cleanup initial spaces followed by tabs. 2006-03-21 13:27:47 +00:00
dma-no-isa.c
entry.S
gdb-low.S [MIPS] War on whitespace: cleanup initial spaces followed by tabs. 2006-03-21 13:27:47 +00:00
gdb-stub.c [PATCH] mips: gdb-stub.c: fix parse error before ; token 2006-02-01 08:53:12 -08:00
genex.S [MIPS] Remove stray .set mips3 resulting in 64-bit instruction in 32-bit kernels. 2006-02-07 13:30:21 +00:00
head.S
i8259.c
init_task.c
irix5sys.S
irixelf.c
irixinv.c
irixioctl.c
irixsig.c
irq_cpu.c
irq-msc01.c
irq-mv6434x.c [MIPS] Momentum: Resurrect after things were moved around a while ago. 2006-03-09 18:05:09 +00:00
irq-rm7000.c
irq-rm9000.c
irq.c [PATCH] more for_each_cpu() conversions 2006-03-23 07:38:17 -08:00
linux32.c [MIPS] sys_mmap2 offset argument should always be shifted 12, not PAGE_SHIFT. 2006-03-21 13:27:48 +00:00
Makefile [PATCH] sanitize building of fs/compat_ioctl.c 2006-01-10 08:01:33 -08:00
mips_ksyms.c
module.c
proc.c [MIPS] Separate CPU entries in /proc/cpuinfo with a blank line. 2006-03-21 13:27:48 +00:00
process.c [MIPS] Signal cleanup 2006-03-21 13:27:46 +00:00
ptrace32.c [MIPS] Sparse: Fix some compiler/sparse warnings in ptrace32.c 2006-02-07 13:30:24 +00:00
ptrace.c [PATCH] mips: task_thread_info() 2006-01-12 09:08:59 -08:00
r4k_fpu.S
r4k_switch.S
r2300_fpu.S
r2300_switch.S
r6000_fpu.S
reset.c [MIPS] Rename _machine_power_off to pm_power_off so the kernel builds again. 2006-02-07 13:30:22 +00:00
rtlx.c [MIPS] RTLX compile fixes. 2006-02-07 13:30:21 +00:00
scall32-o32.S [PATCH] flags parameter for linkat 2006-02-24 14:31:39 -08:00
scall64-64.S [MIPS] Wire up new syscalls. 2006-02-08 17:52:25 +00:00
scall64-n32.S [MIPS] Use generic compat routines for readdir, getdents 2006-02-27 17:30:37 +00:00
scall64-o32.S [MIPS] Use generic compat routines for readdir, getdents 2006-02-27 17:30:37 +00:00
semaphore.c
setup.c [MIPS] Remove CONFIG_BUILD_ELF64. 2006-03-21 13:27:46 +00:00
signal32.c [MIPS] War on whitespace: cleanup initial spaces followed by tabs. 2006-03-21 13:27:47 +00:00
signal_n32.c [MIPS] fix wrong __user usage in _sysn32_rt_sigsuspend 2006-03-21 13:27:46 +00:00
signal-common.h [MIPS] War on whitespace: cleanup initial spaces followed by tabs. 2006-03-21 13:27:47 +00:00
signal.c [MIPS] Signal cleanup 2006-03-21 13:27:46 +00:00
smp_mt.c [MIPS] SMP: Fix initialization order bug. 2006-02-27 17:30:36 +00:00
smp.c [PATCH] more for_each_cpu() conversions 2006-03-23 07:38:17 -08:00
syscall.c [MIPS] sys_mmap2 offset argument should always be shifted 12, not PAGE_SHIFT. 2006-03-21 13:27:48 +00:00
sysirix.c [PATCH] sys_alarm() unsigned signed conversion fixup 2006-03-25 08:22:48 -08:00
time.c [MIPS] Protect more of timer_interrupt() by xtime_lock. 2006-03-18 16:59:29 +00:00
traps.c [MIPS] War on whitespace: cleanup initial spaces followed by tabs. 2006-03-21 13:27:47 +00:00
unaligned.c
vmlinux.lds.S [MIPS] Discard .exit.text at runtime. 2006-03-09 18:05:09 +00:00
vpe.c MIPS: MT: Fix 32-bit dependencies. 2006-01-10 13:39:06 +00:00