From 3e0c6a3af891d46527b04652f37d6588c830f917 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 7 Apr 2009 23:21:06 -0700 Subject: [PATCH] --- yaml --- r: 142800 b: refs/heads/master c: 3a709703538c471530405556dda136fd0d82b0dc h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/kernel/ptrace.c | 16 +++++++--------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/[refs] b/[refs] index 7a930b9a25b9..cc144851c1e4 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 4c967291fc875a53de7126d256ad5e48f42a6521 +refs/heads/master: 3a709703538c471530405556dda136fd0d82b0dc diff --git a/trunk/kernel/ptrace.c b/trunk/kernel/ptrace.c index aaad0ec34194..64191fa09b7e 100644 --- a/trunk/kernel/ptrace.c +++ b/trunk/kernel/ptrace.c @@ -21,9 +21,7 @@ #include #include #include - -#include -#include +#include /* @@ -48,7 +46,7 @@ void __ptrace_link(struct task_struct *child, struct task_struct *new_parent) list_add(&child->ptrace_entry, &new_parent->ptraced); child->parent = new_parent; } - + /* * Turn a tracing stop into a normal stop now, since with no tracer there * would be no way to wake it up with SIGCONT or SIGKILL. If there was a @@ -173,7 +171,7 @@ bool ptrace_may_access(struct task_struct *task, unsigned int mode) task_lock(task); err = __ptrace_may_access(task, mode); task_unlock(task); - return (!err ? true : false); + return !err; } int ptrace_attach(struct task_struct *task) @@ -358,7 +356,7 @@ int ptrace_readdata(struct task_struct *tsk, unsigned long src, char __user *dst copied += retval; src += retval; dst += retval; - len -= retval; + len -= retval; } return copied; } @@ -383,7 +381,7 @@ int ptrace_writedata(struct task_struct *tsk, char __user *src, unsigned long ds copied += retval; src += retval; dst += retval; - len -= retval; + len -= retval; } return copied; } @@ -496,9 +494,9 @@ static int ptrace_resume(struct task_struct *child, long request, long data) if (unlikely(!arch_has_single_step())) return -EIO; user_enable_single_step(child); - } - else + } else { user_disable_single_step(child); + } child->exit_code = data; wake_up_process(child);