aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2007-10-29 11:00:37 -0400
committerRalf Baechle <ralf@linux-mips.org>2007-10-29 15:35:36 -0400
commitc4e8308c30b0139f89bac71f3c22c8d7413b8665 (patch)
treecca61e7378f1cc7796e0aaebd4a95957d1ecaf98 /arch/mips
parent38760d40ca61b18b2809e9c28df8b3ff9af8a02b (diff)
[MIPS] IRIX: Fix off-by-one error in signal compat code.
Based on original patch by Roel Kluin <12o3l@tiscali.nl>. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips')
-rw-r--r--arch/mips/kernel/irixsig.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/mips/kernel/irixsig.c b/arch/mips/kernel/irixsig.c
index a0a91056fda7..33506ff25910 100644
--- a/arch/mips/kernel/irixsig.c
+++ b/arch/mips/kernel/irixsig.c
@@ -24,8 +24,12 @@
24 24
25#define _BLOCKABLE (~(_S(SIGKILL) | _S(SIGSTOP))) 25#define _BLOCKABLE (~(_S(SIGKILL) | _S(SIGSTOP)))
26 26
27#define _IRIX_NSIG 128
28#define _IRIX_NSIG_BPW BITS_PER_LONG
29#define _IRIX_NSIG_WORDS (_IRIX_NSIG / _IRIX_NSIG_BPW)
30
27typedef struct { 31typedef struct {
28 unsigned long sig[4]; 32 unsigned long sig[_IRIX_NSIG_WORDS];
29} irix_sigset_t; 33} irix_sigset_t;
30 34
31struct sigctx_irix5 { 35struct sigctx_irix5 {
@@ -527,7 +531,7 @@ asmlinkage int irix_sigpoll_sys(unsigned long __user *set,
527 531
528 expire = schedule_timeout_interruptible(expire); 532 expire = schedule_timeout_interruptible(expire);
529 533
530 for (i=0; i<=4; i++) 534 for (i=0; i < _IRIX_NSIG_WORDS; i++)
531 tmp |= (current->pending.signal.sig[i] & kset.sig[i]); 535 tmp |= (current->pending.signal.sig[i] & kset.sig[i]);
532 536
533 if (tmp) 537 if (tmp)