dect
/
linux-2.6
Archived
13
0
Fork 0
This repository has been archived on 2022-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
linux-2.6/arch
Heiko Carstens ed4f20943c s390/time: fix sched_clock() overflow
Converting a 64 Bit TOD format value to nanoseconds means that the value
must be divided by 4.096. In order to achieve that we multiply with 125
and divide by 512.
When used within sched_clock() this triggers an overflow after appr.
417 days. Resulting in a sched_clock() return value that is much smaller
than previously and therefore may cause all sort of weird things in
subsystems that rely on a monotonic sched_clock() behaviour.

To fix this implement a tod_to_ns() helper function which converts TOD
values without overflow and call this function from both places that
open coded the conversion: sched_clock() and kvm_s390_handle_wait().

Cc: stable@kernel.org
Reviewed-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2013-01-16 15:57:52 +01:00
..
alpha ALPHA: drivers: remove __dev* attributes. 2013-01-03 15:57:13 -08:00
arm Merge branch 'fixes' of git://git.linaro.org/people/rmk/linux-arm 2013-01-09 08:58:57 -08:00
arm64 - Missing include in asm/compat.h. 2013-01-04 10:41:54 -08:00
avr32 ARCH: drivers remove __dev* attributes. 2013-01-03 15:57:13 -08:00
blackfin ARCH: drivers remove __dev* attributes. 2013-01-03 15:57:13 -08:00
c6x These are a few cleanups for asm-generic: 2012-12-21 16:39:08 -08:00
cris ARCH: drivers remove __dev* attributes. 2013-01-03 15:57:13 -08:00
frv ARCH: drivers remove __dev* attributes. 2013-01-03 15:57:13 -08:00
h8300 These are a few cleanups for asm-generic: 2012-12-21 16:39:08 -08:00
hexagon Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal 2012-12-20 18:05:28 -08:00
ia64 Driver core __dev* removal patches 2013-01-03 16:17:50 -08:00
m32r ARCH: drivers remove __dev* attributes. 2013-01-03 15:57:13 -08:00
m68k ARCH: drivers remove __dev* attributes. 2013-01-03 15:57:13 -08:00
microblaze Merge branch 'next' of git://git.monstr.eu/linux-2.6-microblaze 2013-01-07 07:39:32 -08:00
mips Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2013-01-07 07:50:41 -08:00
mn10300 arch/mn10300/Kconfig: select CONFIG_GENERIC_ATOMIC64 2013-01-11 14:54:55 -08:00
openrisc ARCH: drivers remove __dev* attributes. 2013-01-03 15:57:13 -08:00
parisc ARCH: drivers remove __dev* attributes. 2013-01-03 15:57:13 -08:00
powerpc Merge git://git.kernel.org/pub/scm/virt/kvm/kvm 2013-01-10 09:05:18 -08:00
s390 s390/time: fix sched_clock() overflow 2013-01-16 15:57:52 +01:00
score ARCH: drivers remove __dev* attributes. 2013-01-03 15:57:13 -08:00
sh ARCH: drivers remove __dev* attributes. 2013-01-03 15:57:13 -08:00
sparc SPARC: drivers: remove __dev* attributes. 2013-01-03 15:57:04 -08:00
tile ARCH: drivers remove __dev* attributes. 2013-01-03 15:57:13 -08:00
um Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal 2012-12-20 18:05:28 -08:00
unicore32 ARCH: drivers remove __dev* attributes. 2013-01-03 15:57:13 -08:00
x86 Merge git://git.kernel.org/pub/scm/virt/kvm/kvm 2013-01-10 09:05:18 -08:00
xtensa These are a few cleanups for asm-generic: 2012-12-21 16:39:08 -08:00
.gitignore
Kconfig Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal 2012-12-20 18:05:28 -08:00