diff options
Diffstat (limited to 'kernel/ptrace.c')
-rw-r--r-- | kernel/ptrace.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/ptrace.c b/kernel/ptrace.c index e6e9b8be4b05..b0d4ab4dfd3d 100644 --- a/kernel/ptrace.c +++ b/kernel/ptrace.c | |||
@@ -51,7 +51,7 @@ void __ptrace_link(struct task_struct *child, struct task_struct *new_parent) | |||
51 | void ptrace_untrace(struct task_struct *child) | 51 | void ptrace_untrace(struct task_struct *child) |
52 | { | 52 | { |
53 | spin_lock(&child->sighand->siglock); | 53 | spin_lock(&child->sighand->siglock); |
54 | if (child->state == TASK_TRACED) { | 54 | if (task_is_traced(child)) { |
55 | if (child->signal->flags & SIGNAL_STOP_STOPPED) { | 55 | if (child->signal->flags & SIGNAL_STOP_STOPPED) { |
56 | child->state = TASK_STOPPED; | 56 | child->state = TASK_STOPPED; |
57 | } else { | 57 | } else { |
@@ -79,7 +79,7 @@ void __ptrace_unlink(struct task_struct *child) | |||
79 | add_parent(child); | 79 | add_parent(child); |
80 | } | 80 | } |
81 | 81 | ||
82 | if (child->state == TASK_TRACED) | 82 | if (task_is_traced(child)) |
83 | ptrace_untrace(child); | 83 | ptrace_untrace(child); |
84 | } | 84 | } |
85 | 85 | ||
@@ -103,9 +103,9 @@ int ptrace_check_attach(struct task_struct *child, int kill) | |||
103 | && child->signal != NULL) { | 103 | && child->signal != NULL) { |
104 | ret = 0; | 104 | ret = 0; |
105 | spin_lock_irq(&child->sighand->siglock); | 105 | spin_lock_irq(&child->sighand->siglock); |
106 | if (child->state == TASK_STOPPED) { | 106 | if (task_is_stopped(child)) { |
107 | child->state = TASK_TRACED; | 107 | child->state = TASK_TRACED; |
108 | } else if (child->state != TASK_TRACED && !kill) { | 108 | } else if (!task_is_traced(child) && !kill) { |
109 | ret = -ESRCH; | 109 | ret = -ESRCH; |
110 | } | 110 | } |
111 | spin_unlock_irq(&child->sighand->siglock); | 111 | spin_unlock_irq(&child->sighand->siglock); |