Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Ralf Baechle <ralf@linux-mips.org>
To: Roel Kluin <12o3l@tiscali.nl>
Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>, linux-mips@linux-mips.org
Subject: Re: [PATCH] fix post-fence error
Date: Mon, 29 Oct 2007 15:02:33 +0000	[thread overview]
Message-ID: <20071029150233.GA4165@linux-mips.org> (raw)
In-Reply-To: <47232C2D.8010002@tiscali.nl>

On Sat, Oct 27, 2007 at 02:16:45PM +0200, Roel Kluin wrote:

> Sergei Shtylyov wrote:
> > 
> >    Could also add spaces between the operands and operators (like
> > above/below), while at it...
> > 
> like this?

Thanks. I didn't like the magic numbers in the code so I went for below
patch instead.

Cheers,

  Ralf

From: Ralf Baechle <ralf@linux-mips.org>

[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>

diff --git a/arch/mips/kernel/irixsig.c b/arch/mips/kernel/irixsig.c
index a0a9105..5052f47 100644
--- a/arch/mips/kernel/irixsig.c
+++ b/arch/mips/kernel/irixsig.c
@@ -24,8 +24,12 @@
 
 #define _BLOCKABLE (~(_S(SIGKILL) | _S(SIGSTOP)))
 
+#define _IRIX_NSIG		128
+#define _IRIX_NSIG_BPW		BITS_PER_LONG
+#define _IRIX_NSIG_WORDS	(_IRIX_NSIG / _IRIX_NSIG_BPW)
+
 typedef struct {
-	unsigned long sig[4];
+	unsigned long sig[_IRIX_NSIG_WORDS];
 } irix_sigset_t;
 
 struct sigctx_irix5 {
@@ -527,7 +531,7 @@ asmlinkage int irix_sigpoll_sys(unsigned long __user *set,
 
 		expire = schedule_timeout_interruptible(expire);
 
-		for (i=0; i<=4; i++)
+		for (i=0; i < _IRIX_NSIG_BPW; i++)
 			tmp |= (current->pending.signal.sig[i] & kset.sig[i]);
 
 		if (tmp)

  parent reply	other threads:[~2007-10-29 15:03 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-27  0:02 [PATCH] fix post-fence error Roel Kluin
2007-10-27 12:02 ` Sergei Shtylyov
2007-10-27 12:16   ` Roel Kluin
2007-10-27 12:18     ` Sergei Shtylyov
2007-10-29 15:02     ` Ralf Baechle [this message]
2007-10-29 15:36       ` Sergei Shtylyov
2007-10-29 19:18         ` Ralf Baechle
2007-10-29 20:05           ` Sergei Shtylyov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071029150233.GA4165@linux-mips.org \
    --to=ralf@linux-mips.org \
    --cc=12o3l@tiscali.nl \
    --cc=linux-mips@linux-mips.org \
    --cc=sshtylyov@ru.mvista.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox