[PATCH] convert that currently tests _NSIG directly to use valid_signal()
[deliverable/linux.git] / kernel / sys.c
index 7f43d6e62c7a05641e6b54fcbb9ffda74a8ffcbb..f64e97cabe253603dc860dd74412cc7731fe684d 100644 (file)
@@ -25,6 +25,7 @@
 #include <linux/dcookies.h>
 #include <linux/suspend.h>
 #include <linux/tty.h>
+#include <linux/signal.h>
 
 #include <linux/compat.h>
 #include <linux/syscalls.h>
@@ -1637,7 +1638,7 @@ asmlinkage long sys_prctl(int option, unsigned long arg2, unsigned long arg3,
        switch (option) {
                case PR_SET_PDEATHSIG:
                        sig = arg2;
-                       if (sig < 0 || sig > _NSIG) {
+                       if (!valid_signal(sig)) {
                                error = -EINVAL;
                                break;
                        }
This page took 0.029479 seconds and 5 git commands to generate.