diff options
author | Jesper Juhl <juhl-lkml@dif.dk> | 2005-05-01 11:59:14 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-05-01 11:59:14 -0400 |
commit | 7ed20e1ad521b5f5df61bf6559ae60738e393741 (patch) | |
tree | 90931724e45eaedb3445314e8b94e78253642395 /arch/arm26/kernel | |
parent | e5bdd883a189243541e7a132385580703b049102 (diff) |
[PATCH] convert that currently tests _NSIG directly to use valid_signal()
Convert most of the current code that uses _NSIG directly to instead use
valid_signal(). This avoids gcc -W warnings and off-by-one errors.
Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/arm26/kernel')
-rw-r--r-- | arch/arm26/kernel/ptrace.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/arm26/kernel/ptrace.c b/arch/arm26/kernel/ptrace.c index 2a137146a77c..8a52124de0e1 100644 --- a/arch/arm26/kernel/ptrace.c +++ b/arch/arm26/kernel/ptrace.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/ptrace.h> | 18 | #include <linux/ptrace.h> |
19 | #include <linux/user.h> | 19 | #include <linux/user.h> |
20 | #include <linux/security.h> | 20 | #include <linux/security.h> |
21 | #include <linux/signal.h> | ||
21 | 22 | ||
22 | #include <asm/uaccess.h> | 23 | #include <asm/uaccess.h> |
23 | #include <asm/pgtable.h> | 24 | #include <asm/pgtable.h> |
@@ -591,7 +592,7 @@ static int do_ptrace(int request, struct task_struct *child, long addr, long dat | |||
591 | case PTRACE_SYSCALL: | 592 | case PTRACE_SYSCALL: |
592 | case PTRACE_CONT: | 593 | case PTRACE_CONT: |
593 | ret = -EIO; | 594 | ret = -EIO; |
594 | if ((unsigned long) data > _NSIG) | 595 | if (!valid_signal(data)) |
595 | break; | 596 | break; |
596 | if (request == PTRACE_SYSCALL) | 597 | if (request == PTRACE_SYSCALL) |
597 | set_tsk_thread_flag(child, TIF_SYSCALL_TRACE); | 598 | set_tsk_thread_flag(child, TIF_SYSCALL_TRACE); |
@@ -626,7 +627,7 @@ static int do_ptrace(int request, struct task_struct *child, long addr, long dat | |||
626 | */ | 627 | */ |
627 | case PTRACE_SINGLESTEP: | 628 | case PTRACE_SINGLESTEP: |
628 | ret = -EIO; | 629 | ret = -EIO; |
629 | if ((unsigned long) data > _NSIG) | 630 | if (!valid_signal(data)) |
630 | break; | 631 | break; |
631 | child->ptrace |= PT_SINGLESTEP; | 632 | child->ptrace |= PT_SINGLESTEP; |
632 | clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE); | 633 | clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE); |