]> git.baikalelectronics.ru Git - kernel.git/commit
x86: Reset the debug_stack update counter
authorSteven Rostedt <srostedt@redhat.com>
Wed, 30 May 2012 15:43:19 +0000 (11:43 -0400)
committerSteven Rostedt <rostedt@goodmis.org>
Fri, 1 Jun 2012 03:12:20 +0000 (23:12 -0400)
commit7b4a33f0526d0f3a8a902d136131f0d53da362f7
tree38d711db57d8cf4552e42a69fd4a1d1fa082b391
parent46fa543d30727b3177ef3d5037206da1ac3709d4
x86: Reset the debug_stack update counter

When an NMI goes off and it sees that it preempted the debug stack,
to keep the debug stack safe, it changes the IDT to point to one that
does not modify the stack on breakpoint (to allow breakpoints in NMIs).

But the variable that gets set to know to undo it on exit never gets
cleared on exit. Thus every NMI will reset it on exit the first time
it is done even if it does not need to be reset.

[ Added H. Peter Anvin's suggestion to use this_cpu_read/write ]

Cc: <stable@vger.kernel.org> # v3.3
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
arch/x86/kernel/nmi.c