Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1467860 > unrolled thread

[PATCH] Disable warning for leaked single step handling

Started byAndi Kleen <andi@firstfloor.org>
First post2016-08-22 19:50 +0200
Last post2016-08-22 19:50 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH] Disable warning for leaked single step handling Andi Kleen <andi@firstfloor.org> - 2016-08-22 19:50 +0200

#1467860 — [PATCH] Disable warning for leaked single step handling

FromAndi Kleen <andi@firstfloor.org>
Date2016-08-22 19:50 +0200
Subject[PATCH] Disable warning for leaked single step handling
Message-ID<s91we-Tx-25@gated-at.bofh.it>
From: Andi Kleen <ak@linux.intel.com>

When running the x86 selftests in qemu TCG the leaked single step
warning in traps.c triggers. It's probably an qemu emulation bug,
but for now it means this code needs to be kept and the warning
removed.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
 arch/x86/kernel/traps.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c
index b70ca12dd389..ad999b550ba2 100644
--- a/arch/x86/kernel/traps.c
+++ b/arch/x86/kernel/traps.c
@@ -693,12 +693,10 @@ dotraplinkage void do_debug(struct pt_regs *regs, long error_code)
 		goto exit;
 	}
 
-	if (WARN_ON_ONCE((dr6 & DR_STEP) && !user_mode(regs))) {
+	if ((dr6 & DR_STEP) && !user_mode(regs)) {
 		/*
 		 * Historical junk that used to handle SYSENTER single-stepping.
-		 * This should be unreachable now.  If we survive for a while
-		 * without anyone hitting this warning, we'll turn this into
-		 * an oops.
+		 * Still needed on qemu TCG.
 		 */
 		tsk->thread.debugreg6 &= ~DR_STEP;
 		set_tsk_thread_flag(tsk, TIF_SINGLESTEP);
-- 
2.5.5

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web