]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
x86: disable preemption in delay_tsc()
authorAndrew Morton <akpm@linux-foundation.org>
Thu, 15 Nov 2007 01:00:41 +0000 (17:00 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Thu, 15 Nov 2007 02:45:44 +0000 (18:45 -0800)
commit35d5d08a085c56f153458c3f5d8ce24123617faf
tree2db6e598e87809bc1ce7838861b2cff18e5fe60d
parent7eea436433b7b18045f272562e256976f593f7c0
x86: disable preemption in delay_tsc()

Marin Mitov points out that delay_tsc() can misbehave if it is preempted and
rescheduled on a different CPU which has a skewed TSC.  Fix it by disabling
preemption.

(I assume that the worst-case behaviour here is a stall of 2^32 cycles)

Cc: Andi Kleen <ak@suse.de>
Cc: Marin Mitov <mitov@issp.bas.bg>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/x86/lib/delay_32.c
arch/x86/lib/delay_64.c