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>] [day] [month] [year] [list]
Message-ID: <1391706971-7362-1-git-send-email-paul.gortmaker@windriver.com>
Date:	Thu, 6 Feb 2014 12:16:11 -0500
From:	Paul Gortmaker <paul.gortmaker@...driver.com>
To:	<linux-kernel@...r.kernel.org>
CC:	Paul Gortmaker <paul.gortmaker@...driver.com>,
	Ingo Molnar <mingo@...hat.com>,
	Peter Zijlstra <peterz@...radead.org>
Subject: [PATCH] sched.h: make max_threads "extern int" to fix sparse warning

Fixes:

  kernel/fork.c:93:5: warning: symbol 'max_threads' was not declared. Should it be static?

Cc: Ingo Molnar <mingo@...hat.com>
Cc: Peter Zijlstra <peterz@...radead.org>
Signed-off-by: Paul Gortmaker <paul.gortmaker@...driver.com>
---
 include/linux/sched.h | 1 +
 kernel/kmod.c         | 2 --
 kernel/sysctl.c       | 2 +-
 3 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/include/linux/sched.h b/include/linux/sched.h
index 69c6089944c8..af544d650617 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -163,6 +163,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 55a36537fef4..4aa49adec5dd 100644
--- a/kernel/kmod.c
+++ b/kernel/kmod.c
@@ -44,8 +44,6 @@
 
 #include <trace/events/module.h>
 
-extern int max_threads;
-
 static struct workqueue_struct *khelper_wq;
 
 /*
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 7754ff16f334..c8ac136fcec1 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -22,6 +22,7 @@
 #include <linux/mm.h>
 #include <linux/swap.h>
 #include <linux/slab.h>
+#include <linux/sched.h>
 #include <linux/sysctl.h>
 #include <linux/bitmap.h>
 #include <linux/signal.h>
@@ -96,7 +97,6 @@
 #if defined(CONFIG_SYSCTL)
 
 /* External variables not in a header file. */
-extern int max_threads;
 extern int suid_dumpable;
 #ifdef CONFIG_COREDUMP
 extern int core_uses_pid;
-- 
1.8.5.2

--
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