Upgrade to 4.4.50-rt62
[kvmfornfv.git] / kernel / arch / tile / kernel / ptrace.c
index f84eed8..6239aa1 100644 (file)
@@ -111,7 +111,7 @@ static int tile_gpr_set(struct task_struct *target,
                          const void *kbuf, const void __user *ubuf)
 {
        int ret;
-       struct pt_regs regs;
+       struct pt_regs regs = *task_pt_regs(target);
 
        ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, &regs, 0,
                                 sizeof(regs));
@@ -262,6 +262,9 @@ int do_syscall_trace_enter(struct pt_regs *regs)
        if (work & _TIF_NOHZ)
                user_exit();
 
+       if (secure_computing() == -1)
+               return -1;
+
        if (work & _TIF_SYSCALL_TRACE) {
                if (tracehook_report_syscall_entry(regs))
                        regs->regs[TREG_SYSCALL_NR] = -1;