projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge tag 'for-linus-4.1b-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git...
[firefly-linux-kernel-4.4.55.git]
/
kernel
/
sysctl.c
diff --git
a/kernel/sysctl.c
b/kernel/sysctl.c
index 8c0eabd418862bcaaebc7b01dcc3ea7ce4951a2b..2082b1a88fb9a451a00a759379bec8d786c3bab7 100644
(file)
--- a/
kernel/sysctl.c
+++ b/
kernel/sysctl.c
@@
-93,11
+93,9
@@
#include <linux/nmi.h>
#endif
#include <linux/nmi.h>
#endif
-
#if defined(CONFIG_SYSCTL)
/* External variables not in a header file. */
#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;
extern int suid_dumpable;
#ifdef CONFIG_COREDUMP
extern int core_uses_pid;
@@
-710,10
+708,10
@@
static struct ctl_table kern_table[] = {
#endif
{
.procname = "threads-max",
#endif
{
.procname = "threads-max",
- .data =
&max_threads
,
+ .data =
NULL
,
.maxlen = sizeof(int),
.mode = 0644,
.maxlen = sizeof(int),
.mode = 0644,
- .proc_handler =
proc_dointvec
,
+ .proc_handler =
sysctl_max_threads
,
},
{
.procname = "random",
},
{
.procname = "random",
@@
-1335,6
+1333,15
@@
static struct ctl_table vm_table[] = {
.extra1 = &min_extfrag_threshold,
.extra2 = &max_extfrag_threshold,
},
.extra1 = &min_extfrag_threshold,
.extra2 = &max_extfrag_threshold,
},
+ {
+ .procname = "compact_unevictable_allowed",
+ .data = &sysctl_compact_unevictable_allowed,
+ .maxlen = sizeof(int),
+ .mode = 0644,
+ .proc_handler = proc_dointvec,
+ .extra1 = &zero,
+ .extra2 = &one,
+ },
#endif /* CONFIG_COMPACTION */
{
#endif /* CONFIG_COMPACTION */
{
@@
-1974,7
+1981,15
@@
static int do_proc_dointvec_conv(bool *negp, unsigned long *lvalp,
int write, void *data)
{
if (write) {
int write, void *data)
{
if (write) {
- *valp = *negp ? -*lvalp : *lvalp;
+ if (*negp) {
+ if (*lvalp > (unsigned long) INT_MAX + 1)
+ return -EINVAL;
+ *valp = -*lvalp;
+ } else {
+ if (*lvalp > (unsigned long) INT_MAX)
+ return -EINVAL;
+ *valp = *lvalp;
+ }
} else {
int val = *valp;
if (val < 0) {
} else {
int val = *valp;
if (val < 0) {