[PATCH 0/3 v3] kernel/fork.c max_thread handling

Heinrich Schuchardt
2015-02-21T22:21:10Z

In fork_init a division by zero may occur. This is addressed in the
first patch.

Furthermore max_threads is checked against FUTEX_TID_MASK._

The calculation of max_threads is moved to a separate function.

The second patch addresses max_threads being set by writing to
/proc/sys/kernel/threads-max. The same limits are applied as
in fork_init.

The third patch uses a callback function to updated max_thread when
a memory hotplug event occurs.

New in version 3:
Determination of max_threads moved to separate function.
Handling of /proc/sys/kernel/threads-max
Handling of memory hotplugging.

Heinrich Schuchardt (3):
kernel/fork.c: avoid division by zero
kernel/sysctl.c: threads-max observe limits
kernel/fork.c: memory hotplug updates max_threads

kernel/fork.c | 112 ++++++++++++++++++++++++++++++++++++++++++++++++--------
kernel/sysctl.c | 7 ++--
2 files changed, 100 insertions(+), 19 deletions(-)

--
2.1.4