diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.2.5.41/kernel/fork.c linux.2.5.41-ac1/kernel/fork.c
--- linux.2.5.41/kernel/fork.c 2002-10-07 22:12:28.000000000 +0100
+++ linux.2.5.41-ac1/kernel/fork.c 2002-10-07 23:17:19.000000000 +0100
@@ -165,12 +165,14 @@
* of memory.
*/
max_threads = mempages / (THREAD_SIZE/PAGE_SIZE) / 8;
-
/*
- * we need to allow at least 10 threads to boot a system
+ * we need to allow at least 20 threads to boot a system
*/
- init_task.rlim[RLIMIT_NPROC].rlim_cur = max(10, max_threads/2);
- init_task.rlim[RLIMIT_NPROC].rlim_max = max(10, max_threads/2);
+ if(max_threads < 20)
+ max_threads = 20;
+
+ init_task.rlim[RLIMIT_NPROC].rlim_cur = max_threads/2;
+ init_task.rlim[RLIMIT_NPROC].rlim_max = max_threads/2;
}
static struct task_struct *dup_task_struct(struct task_struct *orig)
On Tue, Oct 08, 2002 at 08:07:40PM +0100, Alan Cox wrote:
> /*
> - * we need to allow at least 10 threads to boot a system
> + * we need to allow at least 20 threads to boot a system
> */
> - init_task.rlim[RLIMIT_NPROC].rlim_cur = max(10, max_threads/2);
> - init_task.rlim[RLIMIT_NPROC].rlim_max = max(10, max_threads/2);
> + if(max_threads < 20)
> + max_threads = 20;
> +
> + init_task.rlim[RLIMIT_NPROC].rlim_cur = max_threads/2;
> + init_task.rlim[RLIMIT_NPROC].rlim_max = max_threads/2;
Colour me dense, but the comment says 20, and you set rlim_max to 20/2.
Can this possibly be right ?
john
--
"I will eat a rubber tire to the music of The Flight of the Bumblebee"