Re: /proc/sys/kernel/pid_max issues

From: William Lee Irwin III
Date: Sun Sep 12 2004 - 05:44:16 EST


On Sun, Sep 12, 2004 at 12:13:50PM +0200, Ingo Molnar wrote:
> in fact we can now merge the max_limit and pid_max checks - see the
> attached updated patch.
> fix pid_max handling. Wrap around correctly.
> Signed-off-by: William Lee Irwin III <wli@xxxxxxxxxxxxxx>
> Signed-off-by: Ingo Molnar <mingo@xxxxxxx>

I like the update. But I see other issues. For instance (also untested):


pid wrapping doesn't honor RESERVED_PIDS.

Index: mm4-2.6.9-rc1/kernel/pid.c
===================================================================
--- mm4-2.6.9-rc1.orig/kernel/pid.c 2004-09-12 03:26:07.781592064 -0700
+++ mm4-2.6.9-rc1/kernel/pid.c 2004-09-12 03:26:50.063164288 -0700
@@ -128,7 +128,10 @@
map = next_free_map(map, &max_steps);
if (!map)
goto failure;
- offset = 0;
+ else if (map != pidmap_array)
+ offset = 0;
+ else
+ offset = RESERVED_PIDS;
}
/*
* Find the next zero bit:
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/