diff options
Diffstat (limited to 'fs/proc/base.c')
| -rw-r--r-- | fs/proc/base.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c index 82da55b5cffe..8df27401d292 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 | ||
| 91 | struct pid_entry { | 92 | struct pid_entry { |
| 92 | int len; | 93 | int len; |
| @@ -689,7 +690,8 @@ static ssize_t oom_adjust_write(struct file *file, const char __user *buf, | |||
| 689 | if (copy_from_user(buffer, buf, count)) | 690 | if (copy_from_user(buffer, buf, count)) |
| 690 | return -EFAULT; | 691 | return -EFAULT; |
| 691 | oom_adjust = simple_strtol(buffer, &end, 0); | 692 | oom_adjust = simple_strtol(buffer, &end, 0); |
| 692 | if ((oom_adjust < -16 || oom_adjust > 15) && oom_adjust != OOM_DISABLE) | 693 | if ((oom_adjust < OOM_ADJUST_MIN || oom_adjust > OOM_ADJUST_MAX) && |
| 694 | oom_adjust != OOM_DISABLE) | ||
| 693 | return -EINVAL; | 695 | return -EINVAL; |
| 694 | if (*end == '\n') | 696 | if (*end == '\n') |
| 695 | end++; | 697 | end++; |
