LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Neil Brown <neilb@suse.de>
To: Sean Reifschneider <jafo@tummy.com>
Cc: linux-kernel@vger.kernel.org, ak@suse.de
Subject: PATCH - x86-64 signed-compare bug, was Re: select() setting ERESTARTNOHAND (514).
Date: Thu, 11 Jan 2007 11:37:05 +1100 [thread overview]
Message-ID: <17829.34481.340913.519675@notabene.brown> (raw)
In-Reply-To: message from Sean Reifschneider on Wednesday January 10
On Wednesday January 10, jafo@tummy.com wrote:
>
> In looking at the Linux code for ERESTARTNOHAND, I see that
> include/linux/errno.h says this errno should never make it to the user.
> However, in this instance we ARE seeing it. Looking around on google shows
> others are seeing it as well, though hits are few.
..
>
> Thoughts?
Just a 'me too' at this point.
The X server on my shiny new notebook (Core 2 Duo) occasionally dies
with 'select' repeatedly returning ERESTARTNOHAND. It is most
annoying!
You don't mention in the Email which kernel version you use but I see
from the web page you reference it is 2.6.19.1. I'm using
2.6.18.something.
I thought I'd have a quick look at the code, comparing i386 to x86-64
and guess what I found.....
On x86-64, regs->rax is "unsigned long", so the following is
needed....
I haven't tried it yet.
NeilBrown
Signed-off-by: Neil Brown <neilb@suse.de>
### Diffstat output
./arch/x86_64/kernel/signal.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff .prev/arch/x86_64/kernel/signal.c ./arch/x86_64/kernel/signal.c
--- .prev/arch/x86_64/kernel/signal.c 2007-01-11 11:33:27.000000000 +1100
+++ ./arch/x86_64/kernel/signal.c 2007-01-11 11:34:01.000000000 +1100
@@ -331,7 +331,7 @@ handle_signal(unsigned long sig, siginfo
/* Are we from a system call? */
if ((long)regs->orig_rax >= 0) {
/* If so, check system call restarting.. */
- switch (regs->rax) {
+ switch ((long)regs->rax) {
case -ERESTART_RESTARTBLOCK:
case -ERESTARTNOHAND:
regs->rax = -EINTR;
next prev parent reply other threads:[~2007-01-11 0:37 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-10 23:42 Sean Reifschneider
2007-01-11 0:27 ` David Miller
2007-01-11 1:04 ` Sean Reifschneider
2007-01-11 1:15 ` David Miller
2007-01-11 8:25 ` Sean Reifschneider
2007-01-11 22:22 ` bert hubert
2007-01-24 0:50 ` Sean Reifschneider
2007-01-11 0:37 ` Neil Brown [this message]
2007-01-11 0:40 ` PATCH - x86-64 signed-compare bug, was " Andi Kleen
2007-01-11 1:02 ` Neil Brown
2007-01-11 1:37 ` Andi Kleen
2007-01-11 4:09 ` Sean Reifschneider
2007-01-11 19:38 ` Denis Vlasenko
2007-01-11 0:43 ` David Miller
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=17829.34481.340913.519675@notabene.brown \
--to=neilb@suse.de \
--cc=ak@suse.de \
--cc=jafo@tummy.com \
--cc=linux-kernel@vger.kernel.org \
--subject='PATCH - x86-64 signed-compare bug, was Re: select() setting ERESTARTNOHAND (514).' \
/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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).