summary refs log tree commit diff
path: root/pkgs/os-specific
diff options
context:
space:
mode:
authorLluís Batlle i Rossell <viric@vicerveza.homeunix.net>2010-11-21 15:26:36 +0000
committerLluís Batlle i Rossell <viric@vicerveza.homeunix.net>2010-11-21 15:26:36 +0000
commit13a8b34a81632aa8c23293c5646d43cab724e878 (patch)
treeab810fdbc6e613058e83dd784cd5fe62a83bdf53 /pkgs/os-specific
parentc1620ef5523df0a4a6dec11389d5d89e9955bdb2 (diff)
Fix for a syscall restart bug on linux-mips
svn path=/nixpkgs/branches/stdenv-updates/; revision=24791
Diffstat (limited to 'pkgs/os-specific')
-rw-r--r--pkgs/os-specific/linux/kernel/mips_restart.patch12
-rw-r--r--pkgs/os-specific/linux/kernel/patches.nix5
2 files changed, 17 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/kernel/mips_restart.patch b/pkgs/os-specific/linux/kernel/mips_restart.patch
new file mode 100644
index 0000000000000..42a9b4f253c87
--- /dev/null
+++ b/pkgs/os-specific/linux/kernel/mips_restart.patch
@@ -0,0 +1,12 @@
+diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c
+index 9996094..ae167df 100644
+--- a/arch/mips/kernel/process.c
++++ b/arch/mips/kernel/process.c
+@@ -142,7 +142,6 @@ int copy_thread(unsigned long clone_flags, unsigned long usp,
+ 	childregs->regs[7] = 0;	/* Clear error flag */
+ 
+ 	childregs->regs[2] = 0;	/* Child gets zero as return value */
+-	regs->regs[2] = p->pid;
+ 
+ 	if (childregs->cp0_status & ST0_CU0) {
+ 		childregs->regs[28] = (unsigned long) ti;
diff --git a/pkgs/os-specific/linux/kernel/patches.nix b/pkgs/os-specific/linux/kernel/patches.nix
index cdaa9da57d933..3ad48033f7a29 100644
--- a/pkgs/os-specific/linux/kernel/patches.nix
+++ b/pkgs/os-specific/linux/kernel/patches.nix
@@ -203,6 +203,11 @@ in
       patch = ./sheevaplug_modules-2.6.35.patch;
     };
 
+  mips_restart_2_6_36 =
+    { name = "mips_restart_2_6_36";
+      patch = ./mips_restart.patch;
+    };
+
   guruplug_defconfig =
     { # Default configuration for the GuruPlug.  From
       # <http://www.openplug.org/plugwiki/images/c/c6/Guruplug-patchset-2.6.33.2.tar.bz2>.