kernel/sysctl.c: threads-max observe limits
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Thu, 16 Apr 2015 19:47:50 +0000 (12:47 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 17 Apr 2015 13:04:07 +0000 (09:04 -0400)
commit16db3d3f1170fb0efca652c9378ce7c5f5cb4232
treef85f846c4e8a4761449aeca34dbd1055bb693828
parentac1b398de1ef94aeee8ba87b0120763526572a6e
kernel/sysctl.c: threads-max observe limits

Users can change the maximum number of threads by writing to
/proc/sys/kernel/threads-max.

With the patch the value entered is checked against the same limits that
apply when fork_init is called.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/sysctl.h
kernel/fork.c
kernel/sysctl.c