]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/x86/kernel/ptrace_64.c
x86: convert mm_context_t semaphore to a mutex
[linux-2.6-omap-h63xx.git] / arch / x86 / kernel / ptrace_64.c
index eea3702427b409d28c83c7e02a88c093a5c26232..607085f3f08a3359526df4ff6cfe745a1e92fa98 100644 (file)
@@ -1,4 +1,3 @@
-/* ptrace.c */
 /* By Ross Biro 1/23/92 */
 /*
  * Pentium III FXSR, SSE support
@@ -104,7 +103,7 @@ unsigned long convert_rip_to_linear(struct task_struct *child, struct pt_regs *r
 
                seg &= ~7UL;
 
-               down(&child->mm->context.sem);
+               mutex_lock(&child->mm->context.lock);
                if (unlikely((seg >> 3) >= child->mm->context.size))
                        addr = -1L; /* bogus selector, access would fault */
                else {
@@ -118,7 +117,7 @@ unsigned long convert_rip_to_linear(struct task_struct *child, struct pt_regs *r
                                addr &= 0xffff;
                        addr += base;
                }
-               up(&child->mm->context.sem);
+               mutex_unlock(&child->mm->context.lock);
        }
 
        return addr;
@@ -501,11 +500,6 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
                ret = 0;
                break;
 
-       case PTRACE_DETACH:
-               /* detach a process that was attached. */
-               ret = ptrace_detach(child, data);
-               break;
-
        case PTRACE_GETREGS: { /* Get all gp regs from the child. */
                if (!access_ok(VERIFY_WRITE, (unsigned __user *)data,
                               sizeof(struct user_regs_struct))) {