lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1305329059-2017-3-git-send-email-andi@firstfloor.org>
Date:	Fri, 13 May 2011 16:24:16 -0700
From:	Andi Kleen <andi@...stfloor.org>
To:	linux-kernel@...r.kernel.org
Cc:	libc-alpha@...rceware.org, Andi Kleen <ak@...ux.intel.com>
Subject: [PATCH 2/5] Move max_threads variable declaration into include file

From: Andi Kleen <ak@...ux.intel.com>

Multiple files have a private extern for the max_threads variable
defined in fork.c. Declare it in linux/sched.h and remove the
special externs.

Needed for followon patch.

Signed-off-by: Andi Kleen <ak@...ux.intel.com>
---
 include/linux/sched.h |    1 +
 kernel/kmod.c         |    2 --
 kernel/sysctl.c       |    1 -
 3 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/include/linux/sched.h b/include/linux/sched.h
index 781abd1..34b487b 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -134,6 +134,7 @@ extern void get_avenrun(unsigned long *loads, unsigned long offset, int shift);
 
 extern unsigned long total_forks;
 extern int nr_threads;
+extern int max_threads;
 DECLARE_PER_CPU(unsigned long, process_counts);
 extern int nr_processes(void);
 extern unsigned long nr_running(void);
diff --git a/kernel/kmod.c b/kernel/kmod.c
index 9cd0591..3c12d13 100644
--- a/kernel/kmod.c
+++ b/kernel/kmod.c
@@ -39,8 +39,6 @@
 
 #include <trace/events/module.h>
 
-extern int max_threads;
-
 static struct workqueue_struct *khelper_wq;
 
 #ifdef CONFIG_MODULES
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index c0bb324..ece9b94 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -88,7 +88,6 @@
 /* External variables not in a header file. */
 extern int sysctl_overcommit_memory;
 extern int sysctl_overcommit_ratio;
-extern int max_threads;
 extern int core_uses_pid;
 extern int suid_dumpable;
 extern char core_pattern[];
-- 
1.7.4.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ