[PATCH] uml: fix a ptrace call
authorJeff Dike <jdike@addtoit.com>
Thu, 5 May 2005 23:15:30 +0000 (16:15 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Thu, 5 May 2005 23:36:36 +0000 (16:36 -0700)
This fixes write_ldt_entry to treat userspace_pid as an array.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/um/sys-i386/ldt.c

index 31bcb2f997d4ad4f796649e1f4ecd4e8f8b62611..dc755b0b9db8e6a6728ac82d1c1fc943909b9659 100644 (file)
@@ -25,7 +25,7 @@ int sys_modify_ldt_tt(int func, void __user *ptr, unsigned long bytecount)
 #endif
 
 #ifdef CONFIG_MODE_SKAS
-extern int userspace_pid;
+extern int userspace_pid[];
 
 #include "skas_ptrace.h"
 
@@ -56,7 +56,8 @@ int sys_modify_ldt_skas(int func, void __user *ptr, unsigned long bytecount)
        ldt = ((struct ptrace_ldt) { .func      = func,
                                     .ptr       = buf,
                                     .bytecount = bytecount });
-       res = ptrace(PTRACE_LDT, userspace_pid, 0, (unsigned long) &ldt);
+#warning Need to look up userspace_pid by cpu
+       res = ptrace(PTRACE_LDT, userspace_pid[0], 0, (unsigned long) &ldt);
        if(res < 0)
                goto out;