android_kernel_xiaomi_sm8350/kernel
George Anzinger 78fa74a23b [PATCH] posix timers: fix normalization problem
(We found this (after a customer complained) and it is in the kernel.org
kernel.  Seems that for CLOCK_MONOTONIC absolute timers and clock_nanosleep
calls both the request time and wall_to_monotonic are subtracted prior to
the normalize resulting in an overflow in the existing normalize test.
This causes the result to be shifted ~4 seconds ahead instead of ~2 seconds
back in time.)

The normalize code in posix-timers.c fails when the tv_nsec member is ~1.2
seconds negative.  This can happen on absolute timers (and
clock_nanosleeps) requested on CLOCK_MONOTONIC (both the request time and
wall_to_monotonic are subtracted resulting in the possibility of a number
close to -2 seconds.)

This fix uses the set_normalized_timespec() (which does not have an
overflow problem) to fix the problem and as a side effect makes the code
cleaner.

Signed-off-by: George Anzinger <george@mvista.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-28 21:46:05 -07:00
..
irq [PATCH] irqpoll 2005-06-28 21:20:35 -07:00
power [PATCH] Address BUG: using smp_processor_id() in preemptible [00000001] code 2005-07-27 16:25:50 -07:00
acct.c
audit.c AUDIT: Unify auid reporting, put arch before syscall number 2005-05-23 21:35:28 +01:00
auditsc.c AUDIT: Record working directory when syscall arguments are pathnames 2005-05-27 12:17:28 +01:00
capability.c [PATCH] kernel/capability.c: add kerneldoc 2005-07-27 16:26:06 -07:00
compat.c
configs.c
cpu.c [PATCH] i386 CPU hotplug 2005-06-25 16:24:29 -07:00
cpuset.c [PATCH] kernel/cpuset.c: add kerneldoc, fix typos 2005-07-27 16:26:06 -07:00
crash_dump.c [PATCH] kernel/crash_dump.c: add kerneldoc 2005-07-27 16:26:06 -07:00
dma.c
exec_domain.c
exit.c [PATCH] Update cfq io scheduler to time sliced design 2005-06-27 14:33:29 -07:00
extable.c
fork.c [PATCH] lower VM_DONTCOPY total_vm 2005-07-12 16:00:58 -07:00
futex.c
intermodule.c
itimer.c [PATCH] itimer fixes 2005-07-27 16:25:51 -07:00
kallsyms.c
Kconfig.hz [PATCH] i386: Selectable Frequency of the Timer Interrupt 2005-06-23 09:45:10 -07:00
Kconfig.preempt [PATCH] sched: voluntary kernel preemption 2005-06-25 16:24:45 -07:00
kexec.c [PATCH] kexec: fix sparse warnings 2005-06-28 14:53:40 -07:00
kfifo.c
kmod.c [PATCH] Keys: Pass session keyring to call_usermodehelper() 2005-06-24 00:05:18 -07:00
kprobes.c [PATCH] kprobes: fix namespace problem and sparc64 build 2005-07-05 19:19:00 -07:00
ksysfs.c [PATCH] Kdump: Export crash notes section address through sysfs 2005-06-25 16:24:51 -07:00
kthread.c
Makefile [PATCH] kdump: Routines for copying dump pages 2005-06-25 16:24:53 -07:00
module.c [PATCH] make various thing static 2005-06-24 00:06:43 -07:00
panic.c [PATCH] Call emergency_reboot from panic 2005-07-26 14:35:43 -07:00
params.c [PATCH] sysfs: (rest) if show/store is missing return -EIO 2005-06-20 15:15:03 -07:00
pid.c
posix-cpu-timers.c
posix-timers.c [PATCH] posix timers: fix normalization problem 2005-07-28 21:46:05 -07:00
printk.c [PATCH] CPU hotplug printk fix 2005-06-25 16:24:34 -07:00
profile.c [PATCH] mostly_read data section 2005-07-07 18:23:46 -07:00
ptrace.c
rcupdate.c
resource.c [PATCH] Use ALIGN to remove duplicate code 2005-06-25 16:25:02 -07:00
sched.c [PATCH] fix MAX_USER_RT_PRIO and MAX_RT_PRIO 2005-07-26 15:40:00 -07:00
seccomp.c
signal.c [PATCH] Cleanup patch for process freezing 2005-06-25 17:10:13 -07:00
softirq.c [PATCH] x86_64: Switch to the interrupt stack when running a softirq in local_bh_enable() 2005-07-28 21:46:02 -07:00
spinlock.c [PATCH] spin_unlock_bh() and preempt_check_resched() 2005-05-21 10:46:48 -07:00
stop_machine.c [PATCH] smp_processor_id() cleanup 2005-06-21 18:46:13 -07:00
sys_ni.c [PATCH] inotify 2005-07-12 20:38:38 -07:00
sys.c [PATCH] Avoid device suspend on reboot 2005-07-27 16:46:37 -07:00
sysctl.c [PATCH] s390: spin lock retry 2005-07-27 16:26:04 -07:00
time.c [PATCH] clean up inline static vs static inline 2005-07-27 16:26:20 -07:00
timer.c [PATCH] kernel/timer: fix msleep_interruptible() comment 2005-06-25 16:24:58 -07:00
uid16.c
user.c [PATCH] inotify 2005-07-12 20:38:38 -07:00
wait.c
workqueue.c