patch-2.4.10 linux/arch/sparc64/kernel/ptrace.c
Next file: linux/arch/sparc64/kernel/sbus.c
Previous file: linux/arch/sparc64/kernel/process.c
Back to the patch index
Back to the overall index
- Lines: 42
- Date:
Tue Sep 18 16:58:03 2001
- Orig file:
v2.4.9/linux/arch/sparc64/kernel/ptrace.c
- Orig date:
Sun Aug 12 13:27:59 2001
diff -u --recursive --new-file v2.4.9/linux/arch/sparc64/kernel/ptrace.c linux/arch/sparc64/kernel/ptrace.c
@@ -105,6 +105,16 @@
};
#endif
+/*
+ * Called by kernel/ptrace.c when detaching..
+ *
+ * Make sure single step bits etc are not set.
+ */
+void ptrace_disable(struct task_struct *child)
+{
+ /* nothing to do */
+}
+
asmlinkage void do_ptrace(struct pt_regs *regs)
{
int request = regs->u_regs[UREG_I0];
@@ -562,22 +572,11 @@
}
case PTRACE_SUNDETACH: { /* detach a process that was attached. */
- unsigned long flags;
-
- if ((unsigned long) data > _NSIG) {
+ int error = ptrace_detach(child, data);
+ if (error) {
pt_error_return(regs, EIO);
goto out_tsk;
}
- child->ptrace &= ~(PT_PTRACED|PT_TRACESYS);
- child->exit_code = data;
-
- write_lock_irqsave(&tasklist_lock, flags);
- REMOVE_LINKS(child);
- child->p_pptr = child->p_opptr;
- SET_LINKS(child);
- write_unlock_irqrestore(&tasklist_lock, flags);
-
- wake_up_process(child);
pt_succ_return(regs, 0);
goto out_tsk;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)