[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>
This commit is contained in:

committed by
Linus Torvalds

parent
e5bdd883a1
commit
7ed20e1ad5
@@ -23,6 +23,7 @@
|
||||
#include <linux/sched.h>
|
||||
#include <linux/smp_lock.h>
|
||||
#include <linux/ptrace.h>
|
||||
#include <linux/signal.h>
|
||||
|
||||
#include <asm/errno.h>
|
||||
#include <asm/ptrace.h>
|
||||
@@ -208,7 +209,7 @@ int sys_ptrace(long request, long pid, long addr, long data)
|
||||
/* Execute a single instruction. */
|
||||
case PTRACE_SINGLESTEP:
|
||||
rval = -EIO;
|
||||
if ((unsigned long) data > _NSIG)
|
||||
if (!valid_signal(data))
|
||||
break;
|
||||
|
||||
/* Turn CHILD's single-step flag on or off. */
|
||||
|
Reference in New Issue
Block a user