Merge to Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.13-vs2...
[linux-2.6.git] / arch / v850 / kernel / ptrace.c
index 061bd4d..6e2adab 100644 (file)
@@ -117,6 +117,9 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
 {
        int rval;
 
+       if (!vx_check(vx_task_xid(child), VX_WATCH|VX_IDENT))
+               goto out;
+
        switch (request) {
                unsigned long val, copied;
 
@@ -137,8 +140,6 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
                        break;
                rval = -EIO;
                goto out;
-       if (!vx_check(vx_task_xid(child), VX_WATCH|VX_IDENT))
-               goto out_tsk;
 
        /* Read/write the word at location ADDR in the registers.  */
        case PTRACE_PEEKUSR: