android_kernel_xiaomi_sm8350/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 Support the MIPS32 / MIPS64 DSP ASE. 2005-10-29 19:31:17 +01:00
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 Support the MIPS32 / MIPS64 DSP ASE. 2005-10-29 19:31:17 +01:00
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 Dummy ISA DMA functions for systems that don't have ISA but share 2005-10-29 19:30:17 +01:00
entry.S Fix excessive signal latencies. 2005-10-29 19:32:23 +01:00
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 Support for MIPSsim, the cycle accurate MIPS simulator. 2005-10-29 19:32:30 +01:00
i8259.c Date: Fri Jan 14 03:03:23 2005 +0000 2005-10-29 19:32:39 +01:00
init_task.c
irix5sys.S
irixelf.c [PATCH] Don't uselessly export task_struct to userspace in core dumps 2005-10-30 17:37:18 -08:00
irixinv.c Sparseify MIPS. 2005-10-29 19:30:50 +01:00
irixioctl.c Reformatting, remove debugging code. 2005-10-29 19:30:57 +01:00
irixsig.c [MIPS] Avoid duplicate do_syscall_trace calls on return from sigreturn. 2005-12-01 11:05:18 +00:00
irq_cpu.c MT bulletproofing. 2005-10-29 19:32:09 +01:00
irq-msc01.c More AP / SP bits for the 34K, the Malta bits and things. Still wants 2005-10-29 19:31:53 +01:00
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 Convert struct hw_interrupt_type initializations to ISO C99 named 2005-10-29 19:30:46 +01:00
irq-rm9000.c Convert struct hw_interrupt_type initializations to ISO C99 named 2005-10-29 19:30:46 +01:00
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 Improved modules loader, more robust and works on 64bit kernels. 2005-10-29 19:30:39 +01:00
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 Support the MIPS32 / MIPS64 DSP ASE. 2005-10-29 19:31:17 +01:00
r4k_switch.S Fixup a few lose ends in explicit support for MIPS R1/R2. 2005-10-29 19:32:37 +01:00
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 Always use ".set mips3" rather than select between "mips2" or "mips3" 2005-10-29 19:31:31 +01:00
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 Sparseify MIPS. 2005-10-29 19:30:50 +01:00
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