lkml.org 
[lkml]   [2004]   [Nov]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] Fork fix fix
Date

The attached patch fixes the fork fix to avoid the divide-by-zero error I'd
previously fixed, but without using any sort of conditional.

Signed-Off-By: David Howells <dhowells@redhat.com>
---
warthog>diffstat fork-2610rc2mm1.diff
fork.c | 5 +----
1 files changed, 1 insertion(+), 4 deletions(-)

diff -uNrp /warthog/kernels/linux-2.6.10-rc2-mm1/kernel/fork.c linux-2.6.10-rc2-mm1-frv/kernel/fork.c
--- /warthog/kernels/linux-2.6.10-rc2-mm1/kernel/fork.c 2004-11-16 11:31:47.732546390 +0000
+++ linux-2.6.10-rc2-mm1-frv/kernel/fork.c 2004-11-16 16:56:30.990473701 +0000
@@ -120,10 +120,7 @@ void __init fork_init(unsigned long memp
* value: the thread structures can take up at most half
* of memory.
*/
- if (THREAD_SIZE >= PAGE_SIZE)
- max_threads = mempages / (THREAD_SIZE/PAGE_SIZE) / 8;
- else
- max_threads = mempages / 8;
+ max_threads = mempages / (8 * THREAD_SIZE / PAGE_SIZE);

/*
* we need to allow at least 20 threads to boot a system
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 14:08    [W:0.041 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site