|
@@ -577,7 +577,6 @@ do_general_protection(struct pt_regs *regs, long error_code)
|
|
|
}
|
|
|
NOKPROBE_SYMBOL(do_general_protection);
|
|
|
|
|
|
-/* May run on IST stack. */
|
|
|
dotraplinkage void notrace do_int3(struct pt_regs *regs, long error_code)
|
|
|
{
|
|
|
#ifdef CONFIG_DYNAMIC_FTRACE
|
|
@@ -592,6 +591,13 @@ dotraplinkage void notrace do_int3(struct pt_regs *regs, long error_code)
|
|
|
if (poke_int3_handler(regs))
|
|
|
return;
|
|
|
|
|
|
+ /*
|
|
|
+ * Use ist_enter despite the fact that we don't use an IST stack.
|
|
|
+ * We can be called from a kprobe in non-CONTEXT_KERNEL kernel
|
|
|
+ * mode or even during context tracking state changes.
|
|
|
+ *
|
|
|
+ * This means that we can't schedule. That's okay.
|
|
|
+ */
|
|
|
ist_enter(regs);
|
|
|
RCU_LOCKDEP_WARN(!rcu_is_watching(), "entry code didn't wake RCU");
|
|
|
#ifdef CONFIG_KGDB_LOW_LEVEL_TRAP
|
|
@@ -609,15 +615,10 @@ dotraplinkage void notrace do_int3(struct pt_regs *regs, long error_code)
|
|
|
SIGTRAP) == NOTIFY_STOP)
|
|
|
goto exit;
|
|
|
|
|
|
- /*
|
|
|
- * Let others (NMI) know that the debug stack is in use
|
|
|
- * as we may switch to the interrupt stack.
|
|
|
- */
|
|
|
- debug_stack_usage_inc();
|
|
|
cond_local_irq_enable(regs);
|
|
|
do_trap(X86_TRAP_BP, SIGTRAP, "int3", regs, error_code, NULL);
|
|
|
cond_local_irq_disable(regs);
|
|
|
- debug_stack_usage_dec();
|
|
|
+
|
|
|
exit:
|
|
|
ist_exit(regs);
|
|
|
}
|