aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel/ptrace.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/kernel/ptrace.c')
-rw-r--r--arch/mips/kernel/ptrace.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/mips/kernel/ptrace.c b/arch/mips/kernel/ptrace.c
index 9c6299c733a3..8ae1ebef8b71 100644
--- a/arch/mips/kernel/ptrace.c
+++ b/arch/mips/kernel/ptrace.c
@@ -15,6 +15,7 @@
15 * binaries. 15 * binaries.
16 */ 16 */
17#include <linux/compiler.h> 17#include <linux/compiler.h>
18#include <linux/context_tracking.h>
18#include <linux/kernel.h> 19#include <linux/kernel.h>
19#include <linux/sched.h> 20#include <linux/sched.h>
20#include <linux/mm.h> 21#include <linux/mm.h>
@@ -534,6 +535,8 @@ static inline int audit_arch(void)
534 */ 535 */
535asmlinkage void syscall_trace_enter(struct pt_regs *regs) 536asmlinkage void syscall_trace_enter(struct pt_regs *regs)
536{ 537{
538 user_exit();
539
537 /* do the secure computing check first */ 540 /* do the secure computing check first */
538 secure_computing_strict(regs->regs[2]); 541 secure_computing_strict(regs->regs[2]);
539 542
@@ -570,6 +573,13 @@ out:
570 */ 573 */
571asmlinkage void syscall_trace_leave(struct pt_regs *regs) 574asmlinkage void syscall_trace_leave(struct pt_regs *regs)
572{ 575{
576 /*
577 * We may come here right after calling schedule_user()
578 * or do_notify_resume(), in which case we can be in RCU
579 * user mode.
580 */
581 user_exit();
582
573 audit_syscall_exit(regs); 583 audit_syscall_exit(regs);
574 584
575 if (!(current->ptrace & PT_PTRACED)) 585 if (!(current->ptrace & PT_PTRACED))
@@ -592,4 +602,6 @@ asmlinkage void syscall_trace_leave(struct pt_regs *regs)
592 send_sig(current->exit_code, current, 1); 602 send_sig(current->exit_code, current, 1);
593 current->exit_code = 0; 603 current->exit_code = 0;
594 } 604 }
605
606 user_enter();
595} 607}