linux/arch/s390
Heiko Carstens d911e03d09 s390/timer: avoid overflow when programming clock comparator
Since ed4f209 "s390/time: fix sched_clock() overflow" a new helper function
is used to avoid overflows when converting TOD format values to nanosecond
values.
The kvm interrupt code formerly however only worked by accident because of
an overflow. It tried to program a timer that would expire in more than ~29
years. Because of the old TOD-to-nanoseconds overflow bug the real expiry
value however was much smaller, but now it isn't anymore.
This however triggers yet another bug in the function that programs the clock
comparator s390_next_ktime(): if the absolute "expires" value is after 2042
this will result in an overflow and the programmed value is lower than the
current TOD value which immediatly triggers a clock comparator (= timer)
interrupt.
Since the timer isn't expired it will be programmed immediately again and so
on... the result is a dead system.
To fix this simply program the maximum possible value if an overflow is
detected.

Reported-by: Christian Borntraeger <borntraeger@de.ibm.com>
Tested-by: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: stable@vger.kernel.org # v3.3+
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
2013-01-31 14:01:52 +01:00
..
appldata
boot
crypto
hypfs
include s390/thp: implement pmdp_set_wrprotect() 2013-01-22 13:32:16 +01:00
kernel s390/timer: avoid overflow when programming clock comparator 2013-01-31 14:01:52 +01:00
kvm Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux 2013-01-17 08:56:30 -08:00
lib
math-emu
mm s390/irq: remove split irq fields from /proc/stat 2013-01-08 10:57:07 +01:00
net
oprofile s390/irq: remove split irq fields from /proc/stat 2013-01-08 10:57:07 +01:00
pci s390/irq: remove split irq fields from /proc/stat 2013-01-08 10:57:07 +01:00
Kbuild
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
Kconfig.debug
Makefile s390: use -fPIC for module compile 2013-01-12 18:49:26 +01:00
defconfig