summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2019-07-18 00:07:41 +0000
committerJohannes Weiner <hannes@cmpxchg.org>2019-07-18 00:07:41 +0000
commitd095d05892c5e07e3270704aa8edb8f16c5be25b (patch)
tree6cd76509ea1badf0e888f58483d22b93702d5019
parent66d3f4662674aa4f1e66f4597c84435f894a4d88 (diff)
proc-sysctl-add-shared-variables-for-range-check-fix-4
fix fs/eventpoll.c Cc: Arnd Bergmann <arnd@arndb.de> Cc: Matteo Croce <mcroce@redhat.com> Cc: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-rw-r--r--fs/eventpoll.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/eventpoll.c b/fs/eventpoll.c
index 8bc064630be0..d7f1f5011fac 100644
--- a/fs/eventpoll.c
+++ b/fs/eventpoll.c
@@ -291,6 +291,7 @@ static LIST_HEAD(tfile_check_list);
#include <linux/sysctl.h>
+static long long_zero;
static long long_max = LONG_MAX;
struct ctl_table epoll_table[] = {
@@ -300,7 +301,7 @@ struct ctl_table epoll_table[] = {
.maxlen = sizeof(max_user_watches),
.mode = 0644,
.proc_handler = proc_doulongvec_minmax,
- .extra1 = SYSCTL_ZERO,
+ .extra1 = &long_zero,
.extra2 = &long_max,
},
{ }