aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/sys-i386/ldt.c
diff options
context:
space:
mode:
authorJeff Dike <jdike@addtoit.com>2005-05-05 19:15:30 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-05 19:36:36 -0400
commitea66e8a3b6c4760e8fbf59b1becb6bd8e3dd5376 (patch)
treedc3fff423be6f74aaf8cc4fffb0b493b7b06adae /arch/um/sys-i386/ldt.c
parentfd7aab9c1a4705ed45fe01a7ff108ce9823b0830 (diff)
[PATCH] uml: fix a ptrace call
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>
Diffstat (limited to 'arch/um/sys-i386/ldt.c')
-rw-r--r--arch/um/sys-i386/ldt.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/um/sys-i386/ldt.c b/arch/um/sys-i386/ldt.c
index 31bcb2f997d4..dc755b0b9db8 100644
--- a/arch/um/sys-i386/ldt.c
+++ b/arch/um/sys-i386/ldt.c
@@ -25,7 +25,7 @@ int sys_modify_ldt_tt(int func, void __user *ptr, unsigned long bytecount)
25#endif 25#endif
26 26
27#ifdef CONFIG_MODE_SKAS 27#ifdef CONFIG_MODE_SKAS
28extern int userspace_pid; 28extern int userspace_pid[];
29 29
30#include "skas_ptrace.h" 30#include "skas_ptrace.h"
31 31
@@ -56,7 +56,8 @@ int sys_modify_ldt_skas(int func, void __user *ptr, unsigned long bytecount)
56 ldt = ((struct ptrace_ldt) { .func = func, 56 ldt = ((struct ptrace_ldt) { .func = func,
57 .ptr = buf, 57 .ptr = buf,
58 .bytecount = bytecount }); 58 .bytecount = bytecount });
59 res = ptrace(PTRACE_LDT, userspace_pid, 0, (unsigned long) &ldt); 59#warning Need to look up userspace_pid by cpu
60 res = ptrace(PTRACE_LDT, userspace_pid[0], 0, (unsigned long) &ldt);
60 if(res < 0) 61 if(res < 0)
61 goto out; 62 goto out;
62 63