aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2004-06-19 19:56:58 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-06-19 19:56:58 -0700
commitb2fba2f38fb875a509184eac1c4b4ca9f0739d9e (patch)
tree31edc19e905473674eea8b8e33a9820a305feaf0 /kernel
parent22e53c6563f5a1f73499315d8082b9cce5545564 (diff)
downloadhistory-b2fba2f38fb875a509184eac1c4b4ca9f0739d9e.tar.gz
Follow 2.4.x semantics for in-kernel signal sending.
Diffstat (limited to 'kernel')
-rw-r--r--kernel/signal.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/kernel/signal.c b/kernel/signal.c
index d41b3a0e8b7efb..18048ca42f0ead 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -1197,6 +1197,13 @@ send_sig_info(int sig, struct siginfo *info, struct task_struct *p)
unsigned long flags;
/*
+ * Make sure legacy kernel users don't send in bad values
+ * (normal paths check this in check_kill_permission).
+ */
+ if (sig < 0 || sig > _NSIG)
+ return -EINVAL;
+
+ /*
* We need the tasklist lock even for the specific
* thread case (when we don't need to follow the group
* lists) in order to avoid races with "p->sighand"