aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@redhat.com>2009-12-18 11:43:24 -0500
committerMartin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com>2009-12-18 11:43:32 -0500
commitca633fd006486ed2c2d3b542283067aab61e6dc8 (patch)
tree71ba9fbcf841f5a565185338ef677d6fb8cd89c8 /arch/s390
parentd302e1a5dbe1677a495033a2d310656a55139cdf (diff)
[S390] ptrace: dont abuse PT_PTRACED
Nobody except ptrace itself should use task->ptrace or PT_PTRACED directly, change arch/s390/kernel/traps.c to use the helper. Signed-off-by: Oleg Nesterov <oleg@redhat.com> Acked-by: Roland McGrath <roland@redhat.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390')
-rw-r--r--arch/s390/kernel/traps.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/s390/kernel/traps.c b/arch/s390/kernel/traps.c
index c2e42cc65ce7..6e7ad63854c0 100644
--- a/arch/s390/kernel/traps.c
+++ b/arch/s390/kernel/traps.c
@@ -18,7 +18,7 @@
18#include <linux/kernel.h> 18#include <linux/kernel.h>
19#include <linux/string.h> 19#include <linux/string.h>
20#include <linux/errno.h> 20#include <linux/errno.h>
21#include <linux/ptrace.h> 21#include <linux/tracehook.h>
22#include <linux/timer.h> 22#include <linux/timer.h>
23#include <linux/mm.h> 23#include <linux/mm.h>
24#include <linux/smp.h> 24#include <linux/smp.h>
@@ -382,7 +382,7 @@ void __kprobes do_single_step(struct pt_regs *regs)
382 SIGTRAP) == NOTIFY_STOP){ 382 SIGTRAP) == NOTIFY_STOP){
383 return; 383 return;
384 } 384 }
385 if ((current->ptrace & PT_PTRACED) != 0) 385 if (tracehook_consider_fatal_signal(current, SIGTRAP))
386 force_sig(SIGTRAP, current); 386 force_sig(SIGTRAP, current);
387} 387}
388 388
@@ -483,7 +483,7 @@ static void illegal_op(struct pt_regs * regs, long interruption_code)
483 if (get_user(*((__u16 *) opcode), (__u16 __user *) location)) 483 if (get_user(*((__u16 *) opcode), (__u16 __user *) location))
484 return; 484 return;
485 if (*((__u16 *) opcode) == S390_BREAKPOINT_U16) { 485 if (*((__u16 *) opcode) == S390_BREAKPOINT_U16) {
486 if (current->ptrace & PT_PTRACED) 486 if (tracehook_consider_fatal_signal(current, SIGTRAP))
487 force_sig(SIGTRAP, current); 487 force_sig(SIGTRAP, current);
488 else 488 else
489 signal = SIGILL; 489 signal = SIGILL;