Merge tag 'for-3.8' of git://openrisc.net/~jonas/linux
[deliverable/linux.git] / arch / x86 / kernel / ptrace.c
index 5e0596b0632e244676c686bb0b338ea1e255473f..b629bbe0d9bdeee5a416a8a6390167e595cf6036 100644 (file)
@@ -23,6 +23,7 @@
 #include <linux/hw_breakpoint.h>
 #include <linux/rcupdate.h>
 #include <linux/module.h>
+#include <linux/context_tracking.h>
 
 #include <asm/uaccess.h>
 #include <asm/pgtable.h>
@@ -1491,7 +1492,7 @@ long syscall_trace_enter(struct pt_regs *regs)
 {
        long ret = 0;
 
-       rcu_user_exit();
+       user_exit();
 
        /*
         * If we stepped into a sysenter/syscall insn, it trapped in
@@ -1541,6 +1542,13 @@ void syscall_trace_leave(struct pt_regs *regs)
 {
        bool step;
 
+       /*
+        * We may come here right after calling schedule_user()
+        * or do_notify_resume(), in which case we can be in RCU
+        * user mode.
+        */
+       user_exit();
+
        audit_syscall_exit(regs);
 
        if (unlikely(test_thread_flag(TIF_SYSCALL_TRACEPOINT)))
@@ -1557,5 +1565,5 @@ void syscall_trace_leave(struct pt_regs *regs)
        if (step || test_thread_flag(TIF_SYSCALL_TRACE))
                tracehook_report_syscall_exit(regs, step);
 
-       rcu_user_enter();
+       user_enter();
 }
This page took 0.023983 seconds and 5 git commands to generate.