Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752290AbbBUWVK (ORCPT ); Sat, 21 Feb 2015 17:21:10 -0500 Received: from mout.gmx.net ([212.227.17.20]:55068 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752219AbbBUWVH (ORCPT ); Sat, 21 Feb 2015 17:21:07 -0500 From: Heinrich Schuchardt To: Andrew Morton Cc: Joe Perches , Peter Zijlstra , Oleg Nesterov , Ingo Molnar , Vladimir Davydov , Thomas Gleixner , Kees Cook , David Rientjes , Johannes Weiner , "David S. Miller" , Andy Lutomirski , Michael Marineau , Aaron Tomlin , Prarit Bhargava , Steven Rostedt , Jens Axboe , "Paul E. McKenney" , Rik van Riel , Davidlohr Bueso , Guenter Roeck , linux-kernel@vger.kernel.org, Heinrich Schuchardt Subject: [PATCH 0/3 v3] kernel/fork.c max_thread handling Date: Sat, 21 Feb 2015 23:19:03 +0100 Message-Id: <1424557146-29965-1-git-send-email-xypron.glpk@gmx.de> X-Mailer: git-send-email 2.1.4 In-Reply-To: <20150218122851.d1ae723ff12887f9ab919431@linux-foundation.org> References: <20150218122851.d1ae723ff12887f9ab919431@linux-foundation.org> X-Provags-ID: V03:K0:Ka8onmzhnMzqnFsrwbBShsLVEv9okToGwAv32x+rpjV9D5E/+2e TechFpcQOk3OZfp1igIO5xQRF7CnE45HG2SwvWY3+ud8BrM1gO9iL5WTRriRVgLxqWj8UuU xWfWQ244vwaRC5bYN9GoCr7Cg0j1sZeX04JzVVj8ZgEk50Klr5/Vam1Fqc8fwFzmI6EuG3G ZqYxFfnTRFhMCTUT9aVow== X-UI-Out-Filterresults: notjunk:1; Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1185 Lines: 36 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 -- 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/