projects
/
powerpc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fs/eventfd.c should #include <linux/syscalls.h>
[powerpc.git]
/
kernel
/
ptrace.c
diff --git
a/kernel/ptrace.c
b/kernel/ptrace.c
index
e6e9b8b
..
628b03a
100644
(file)
--- a/
kernel/ptrace.c
+++ b/
kernel/ptrace.c
@@
-20,6
+20,7
@@
#include <linux/signal.h>
#include <linux/audit.h>
#include <linux/pid_namespace.h>
#include <linux/signal.h>
#include <linux/audit.h>
#include <linux/pid_namespace.h>
+#include <linux/syscalls.h>
#include <asm/pgtable.h>
#include <asm/uaccess.h>
#include <asm/pgtable.h>
#include <asm/uaccess.h>
@@
-51,9
+52,9
@@
void __ptrace_link(struct task_struct *child, struct task_struct *new_parent)
void ptrace_untrace(struct task_struct *child)
{
spin_lock(&child->sighand->siglock);
void ptrace_untrace(struct task_struct *child)
{
spin_lock(&child->sighand->siglock);
- if (
child->state == TASK_TRACED
) {
+ if (
task_is_traced(child)
) {
if (child->signal->flags & SIGNAL_STOP_STOPPED) {
if (child->signal->flags & SIGNAL_STOP_STOPPED) {
-
child->state = TASK_STOPPED
;
+
__set_task_state(child, TASK_STOPPED)
;
} else {
signal_wake_up(child, 1);
}
} else {
signal_wake_up(child, 1);
}
@@
-79,7
+80,7
@@
void __ptrace_unlink(struct task_struct *child)
add_parent(child);
}
add_parent(child);
}
- if (
child->state == TASK_TRACED
)
+ if (
task_is_traced(child)
)
ptrace_untrace(child);
}
ptrace_untrace(child);
}
@@
-103,18
+104,16
@@
int ptrace_check_attach(struct task_struct *child, int kill)
&& child->signal != NULL) {
ret = 0;
spin_lock_irq(&child->sighand->siglock);
&& child->signal != NULL) {
ret = 0;
spin_lock_irq(&child->sighand->siglock);
- if (
child->state == TASK_STOPPED) {
+ if (
task_is_stopped(child))
child->state = TASK_TRACED;
child->state = TASK_TRACED;
- } else if (child->state != TASK_TRACED && !kill) {
+ else if (!task_is_traced(child) && !kill)
ret = -ESRCH;
ret = -ESRCH;
- }
spin_unlock_irq(&child->sighand->siglock);
}
read_unlock(&tasklist_lock);
spin_unlock_irq(&child->sighand->siglock);
}
read_unlock(&tasklist_lock);
- if (!ret && !kill)
{
+ if (!ret && !kill)
wait_task_inactive(child);
wait_task_inactive(child);
- }
/* All systems go.. */
return ret;
/* All systems go.. */
return ret;