The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: John Blackwood <john.blackwood@ccur.com>
To: linux-kernel@vger.kernel.org
Cc: ak@muc.de
Subject: [PATCH] arch/x86_64/kernel/signal.c linux-2.6.0-test10
Date: Mon, 24 Nov 2003 15:52:08 -0500	[thread overview]
Message-ID: <3FC26F78.10303@ccur.com> (raw)

Hi Andi,

In linux-2.6.0-test10, I believe that there are several lines of code
in the x86_64 version of handle_signal() that will not ever be executed
and can most likely be removed.

I also believe that there are several lines that should be added to the
end of the do_signal() routine for handling the -ERESTART_RESTARTBLOCK
case.

Thank you.

diff -ru linux-2.6.0-test10/arch/x86_64/kernel/signal.c 
linux/arch/x86_64/kernel/signal.c
--- linux-2.6.0-test10/arch/x86_64/kernel/signal.c      2003-11-23 
20:32:33.000000000 -0500
+++ linux/arch/x86_64/kernel/signal.c   2003-11-24 11:30:18.000000000 -0500
@@ -371,10 +371,6 @@
                                regs->rax = regs->orig_rax;
                                regs->rip -= 2;
                }
-               if (regs->rax == (unsigned long)-ERESTART_RESTARTBLOCK){
-                       regs->rax = __NR_restart_syscall;
-                       regs->rip -= 2;
-               }
        }

 #ifdef CONFIG_IA32_EMULATION
@@ -453,6 +449,10 @@
                        regs->rax = regs->orig_rax;
                        regs->rip -= 2;
                }
+               else if (res == -ERESTART_RESTARTBLOCK) {
+                       regs->rax = __NR_restart_syscall;
+                       regs->rip -= 2;
+               }
        }
        return 0;
 }



             reply	other threads:[~2003-11-24 20:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-24 20:52 John Blackwood [this message]
2003-11-25  0:32 ` [PATCH] arch/x86_64/kernel/signal.c linux-2.6.0-test10 Andi Kleen

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=3FC26F78.10303@ccur.com \
    --to=john.blackwood@ccur.com \
    --cc=ak@muc.de \
    --cc=linux-kernel@vger.kernel.org \
    /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