]> git.baikalelectronics.ru Git - kernel.git/commit
s390/vtime: correct idle time calculation
authorMartin Schwidefsky <schwidefsky@de.ibm.com>
Mon, 28 Oct 2013 11:15:32 +0000 (12:15 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Thu, 31 Oct 2013 08:52:52 +0000 (09:52 +0100)
commit1d5b19bf9ab10f6dbbf82a7efb243877dadea865
treeb0fd4d8705f388783dd893a472105013b702991d
parent94e79b8e9e10b8d755b9814357de60f28344ac42
s390/vtime: correct idle time calculation

Use the ACCESS_ONCE macro for both accesses to idle->sequence in the
loops to calculate the idle time. If only one access uses the macro,
the compiler is free to cache the value for the second access which
can cause endless loops.

Cc: stable@vger.kernel.org # 3.6+
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/kernel/smp.c
arch/s390/kernel/vtime.c