]> git.karo-electronics.de Git - karo-tx-linux.git/commit
x86: Ignore trap bits on single step exceptions
authorFrederic Weisbecker <fweisbec@gmail.com>
Thu, 11 Nov 2010 20:18:43 +0000 (21:18 +0100)
committerAndi Kleen <ak@linux.intel.com>
Tue, 14 Dec 2010 22:40:15 +0000 (23:40 +0100)
commit1442b66f3af5b6ecfb7d70f21c5d062f7c108e0b
tree075aa36221fecedb78660b28633b9a3514805581
parenta28c2bb7f58fad804d4673eb37b7c0436b945f15
x86: Ignore trap bits on single step exceptions

commit 6c0aca288e726405b01dacb12cac556454d34b2a upstream.

When a single step exception fires, the trap bits, used to
signal hardware breakpoints, are in a random state.

These trap bits might be set if another exception will follow,
like a breakpoint in the next instruction, or a watchpoint in the
previous one. Or there can be any junk there.

So if we handle these trap bits during the single step exception,
we are going to handle an exception twice, or we are going to
handle junk.

Just ignore them in this case.

This fixes https://bugzilla.kernel.org/show_bug.cgi?id=21332

Reported-by: Michael Stefaniuc <mstefani@redhat.com>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Maciej Rutecki <maciej.rutecki@gmail.com>
Cc: Alexandre Julliard <julliard@winehq.org>
Cc: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
arch/x86/kernel/hw_breakpoint.c