All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arch/x86_64/kernel/signal.c linux-2.6.0-test10
@ 2003-11-24 20:52 John Blackwood
  2003-11-25  0:32 ` Andi Kleen
  0 siblings, 1 reply; 2+ messages in thread
From: John Blackwood @ 2003-11-24 20:52 UTC (permalink / raw)
  To: linux-kernel; +Cc: ak

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;
 }



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-11-25  0:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-11-24 20:52 [PATCH] arch/x86_64/kernel/signal.c linux-2.6.0-test10 John Blackwood
2003-11-25  0:32 ` Andi Kleen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.