]> git.neil.brown.name Git - history.git/commit
[PATCH] CONFIG_PREEMPT fix of do_debug()
authorJamie Lokier <jamie@shareable.org>
Sat, 8 Feb 2003 18:41:34 +0000 (10:41 -0800)
committerLinus Torvalds <torvalds@home.transmeta.com>
Sat, 8 Feb 2003 18:41:34 +0000 (10:41 -0800)
commit28a59cb02a6b97cb27e914687c0346c608abd110
treeef0942f7f5625aaff86e5a18358ac558e15a859f
parent167b1210f6211d52d3e2f2398434b3bd3ba2b664
[PATCH] CONFIG_PREEMPT fix of do_debug()

If CONFIG_PREEMPT is enabled, and the kernel is preempted just before
do_debug() has a chance to save the debug register values, DR6 could be
read from the wrong CPU.

It is exactly the same problem as reading %cr2 in the page fault
handler.  Same fix: make the handler a interrupt gate, and enable
interrupts only once safe.
arch/i386/kernel/traps.c