diff options
Diffstat (limited to 'arch/m68k/kernel/ptrace.c')
-rw-r--r-- | arch/m68k/kernel/ptrace.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/arch/m68k/kernel/ptrace.c b/arch/m68k/kernel/ptrace.c index 7e54422685cf..540638ca81f9 100644 --- a/arch/m68k/kernel/ptrace.c +++ b/arch/m68k/kernel/ptrace.c | |||
@@ -109,7 +109,7 @@ static inline void singlestep_disable(struct task_struct *child) | |||
109 | { | 109 | { |
110 | unsigned long tmp = get_reg(child, PT_SR) & ~(TRACE_BITS << 16); | 110 | unsigned long tmp = get_reg(child, PT_SR) & ~(TRACE_BITS << 16); |
111 | put_reg(child, PT_SR, tmp); | 111 | put_reg(child, PT_SR, tmp); |
112 | child->thread.work.delayed_trace = 0; | 112 | clear_tsk_thread_flag(child, TIF_DELAYED_TRACE); |
113 | } | 113 | } |
114 | 114 | ||
115 | /* | 115 | /* |
@@ -118,7 +118,7 @@ static inline void singlestep_disable(struct task_struct *child) | |||
118 | void ptrace_disable(struct task_struct *child) | 118 | void ptrace_disable(struct task_struct *child) |
119 | { | 119 | { |
120 | singlestep_disable(child); | 120 | singlestep_disable(child); |
121 | child->thread.work.syscall_trace = 0; | 121 | clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE); |
122 | } | 122 | } |
123 | 123 | ||
124 | long arch_ptrace(struct task_struct *child, long request, long addr, long data) | 124 | long arch_ptrace(struct task_struct *child, long request, long addr, long data) |
@@ -198,9 +198,9 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
198 | goto out_eio; | 198 | goto out_eio; |
199 | 199 | ||
200 | if (request == PTRACE_SYSCALL) | 200 | if (request == PTRACE_SYSCALL) |
201 | child->thread.work.syscall_trace = ~0; | 201 | set_tsk_thread_flag(child, TIF_SYSCALL_TRACE); |
202 | else | 202 | else |
203 | child->thread.work.syscall_trace = 0; | 203 | clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE); |
204 | child->exit_code = data; | 204 | child->exit_code = data; |
205 | singlestep_disable(child); | 205 | singlestep_disable(child); |
206 | wake_up_process(child); | 206 | wake_up_process(child); |
@@ -223,10 +223,10 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
223 | if (!valid_signal(data)) | 223 | if (!valid_signal(data)) |
224 | goto out_eio; | 224 | goto out_eio; |
225 | 225 | ||
226 | child->thread.work.syscall_trace = 0; | 226 | clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE); |
227 | tmp = get_reg(child, PT_SR) | (TRACE_BITS << 16); | 227 | tmp = get_reg(child, PT_SR) | (TRACE_BITS << 16); |
228 | put_reg(child, PT_SR, tmp); | 228 | put_reg(child, PT_SR, tmp); |
229 | child->thread.work.delayed_trace = 1; | 229 | set_tsk_thread_flag(child, TIF_DELAYED_TRACE); |
230 | 230 | ||
231 | child->exit_code = data; | 231 | child->exit_code = data; |
232 | /* give it a chance to run. */ | 232 | /* give it a chance to run. */ |
@@ -288,9 +288,6 @@ out_eio: | |||
288 | 288 | ||
289 | asmlinkage void syscall_trace(void) | 289 | asmlinkage void syscall_trace(void) |
290 | { | 290 | { |
291 | if (!current->thread.work.delayed_trace && | ||
292 | !current->thread.work.syscall_trace) | ||
293 | return; | ||
294 | ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) | 291 | ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) |
295 | ? 0x80 : 0)); | 292 | ? 0x80 : 0)); |
296 | /* | 293 | /* |