From 7c11d7fc7017101d6910ef2fe03c83149513c29f Mon Sep 17 00:00:00 2001 From: William Lee Irwin III Date: Mon, 18 Oct 2004 18:10:43 -0700 Subject: [PATCH] [PATCH] pidhashing: lower PID_MAX_LIMIT for 32-bit machines /proc/ breaks when PID_MAX_LIMIT is elevated on 32-bit, so this patch lowers it there. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/threads.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/threads.h b/include/linux/threads.h index 047e28bd7d8e0..4243c55cce87b 100644 --- a/include/linux/threads.h +++ b/include/linux/threads.h @@ -30,6 +30,6 @@ /* * A maximum of 4 million PIDs should be enough for a while: */ -#define PID_MAX_LIMIT (4*1024*1024) +#define PID_MAX_LIMIT (sizeof(long) > 4 ? 4*1024*1024 : PID_MAX_DEFAULT) #endif -- 2.53.0