aboutsummaryrefslogtreecommitdiffstats
path: root/fs/proc
diff options
context:
space:
mode:
Diffstat (limited to 'fs/proc')
-rw-r--r--fs/proc/base.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c
index 82da55b5cf..795319c54f 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -72,6 +72,7 @@
72#include <linux/audit.h> 72#include <linux/audit.h>
73#include <linux/poll.h> 73#include <linux/poll.h>
74#include <linux/nsproxy.h> 74#include <linux/nsproxy.h>
75#include <linux/oom.h>
75#include "internal.h" 76#include "internal.h"
76 77
77/* NOTE: 78/* NOTE:
@@ -86,7 +87,7 @@
86 87
87 88
88/* Worst case buffer size needed for holding an integer. */ 89/* Worst case buffer size needed for holding an integer. */
89#define PROC_NUMBUF 10 90#define PROC_NUMBUF 13
90 91
91struct pid_entry { 92struct pid_entry {
92 int len; 93 int len;
@@ -441,7 +442,8 @@ static int mountstats_open(struct inode *inode, struct file *file)
441 442
442 if (task) { 443 if (task) {
443 task_lock(task); 444 task_lock(task);
444 namespace = task->nsproxy->namespace; 445 if (task->nsproxy)
446 namespace = task->nsproxy->namespace;
445 if (namespace) 447 if (namespace)
446 get_namespace(namespace); 448 get_namespace(namespace);
447 task_unlock(task); 449 task_unlock(task);
@@ -689,7 +691,8 @@ static ssize_t oom_adjust_write(struct file *file, const char __user *buf,
689 if (copy_from_user(buffer, buf, count)) 691 if (copy_from_user(buffer, buf, count))
690 return -EFAULT; 692 return -EFAULT;
691 oom_adjust = simple_strtol(buffer, &end, 0); 693 oom_adjust = simple_strtol(buffer, &end, 0);
692 if ((oom_adjust < -16 || oom_adjust > 15) && oom_adjust != OOM_DISABLE) 694 if ((oom_adjust < OOM_ADJUST_MIN || oom_adjust > OOM_ADJUST_MAX) &&
695 oom_adjust != OOM_DISABLE)
693 return -EINVAL; 696 return -EINVAL;
694 if (*end == '\n') 697 if (*end == '\n')
695 end++; 698 end++;