diff options
| author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-06-19 19:56:58 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-06-19 19:56:58 -0700 |
| commit | b2fba2f38fb875a509184eac1c4b4ca9f0739d9e (patch) | |
| tree | 31edc19e905473674eea8b8e33a9820a305feaf0 | |
| parent | 22e53c6563f5a1f73499315d8082b9cce5545564 (diff) | |
Follow 2.4.x semantics for in-kernel signal sending.
| -rw-r--r-- | kernel/signal.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/kernel/signal.c b/kernel/signal.c index d41b3a0e8b7e..18048ca42f0e 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" |
