From 13a8b34a81632aa8c23293c5646d43cab724e878 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Sun, 21 Nov 2010 15:26:36 +0000 Subject: [PATCH] Fix for a syscall restart bug on linux-mips svn path=/nixpkgs/branches/stdenv-updates/; revision=24791 --- pkgs/os-specific/linux/kernel/mips_restart.patch | 12 ++++++++++++ pkgs/os-specific/linux/kernel/patches.nix | 5 +++++ pkgs/top-level/all-packages.nix | 1 + 3 files changed, 18 insertions(+) create mode 100644 pkgs/os-specific/linux/kernel/mips_restart.patch 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 00000000000..42a9b4f253c --- /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 cdaa9da57d9..3ad48033f7a 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 # . diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 762743b8e7d..2b519af92e2 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4764,6 +4764,7 @@ let [ #kernelPatches.fbcondecor_2_6_35 kernelPatches.sec_perm_2_6_24 #kernelPatches.aufs2_2_6_35 + kernelPatches.mips_restart_2_6_36 ]; };