diff options
author | Tony Luck <tony.luck@intel.com> | 2005-11-07 09:05:22 -0800 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2005-11-07 09:05:22 -0800 |
commit | 0ad3a96f8ad910ecf87a25ec69ed360b284dee2e (patch) | |
tree | 12d292fd58fc0f7a3eb56c89dfc23569f3ab6c00 /arch/v850 | |
parent | f79b348856fbaf77e4a0c5cb08a808e5879967a9 (diff) | |
parent | 5b2f7ffcb734d3046144dfbd5ac6d76254a9e522 (diff) | |
download | linux-0ad3a96f8ad910ecf87a25ec69ed360b284dee2e.tar.gz linux-0ad3a96f8ad910ecf87a25ec69ed360b284dee2e.tar.bz2 linux-0ad3a96f8ad910ecf87a25ec69ed360b284dee2e.zip |
Auto-update from upstream
Diffstat (limited to 'arch/v850')
-rw-r--r-- | arch/v850/kernel/ptrace.c | 43 |
1 files changed, 2 insertions, 41 deletions
diff --git a/arch/v850/kernel/ptrace.c b/arch/v850/kernel/ptrace.c index d6077ff47d22..18492d02aaf6 100644 --- a/arch/v850/kernel/ptrace.c +++ b/arch/v850/kernel/ptrace.c @@ -113,45 +113,10 @@ static int set_single_step (struct task_struct *t, int val) return 1; } -long sys_ptrace(long request, long pid, long addr, long data) +long arch_ptrace(struct task_struct *child, long request, long addr, long data) { - struct task_struct *child; int rval; - lock_kernel(); - - if (request == PTRACE_TRACEME) { - /* are we already being traced? */ - if (current->ptrace & PT_PTRACED) { - rval = -EPERM; - goto out; - } - /* set the ptrace bit in the process flags. */ - current->ptrace |= PT_PTRACED; - rval = 0; - goto out; - } - rval = -ESRCH; - read_lock(&tasklist_lock); - child = find_task_by_pid(pid); - if (child) - get_task_struct(child); - read_unlock(&tasklist_lock); - if (!child) - goto out; - - rval = -EPERM; - if (pid == 1) /* you may not mess with init */ - goto out_tsk; - - if (request == PTRACE_ATTACH) { - rval = ptrace_attach(child); - goto out_tsk; - } - rval = ptrace_check_attach(child, request == PTRACE_KILL); - if (rval < 0) - goto out_tsk; - switch (request) { unsigned long val, copied; @@ -248,11 +213,7 @@ long sys_ptrace(long request, long pid, long addr, long data) rval = -EIO; goto out; } - -out_tsk: - put_task_struct(child); -out: - unlock_kernel(); + out: return rval; } |