diff options
| author | Jens Axboe <axboe@fb.com> | 2017-04-24 22:03:14 -0600 |
|---|---|---|
| committer | Jens Axboe <axboe@fb.com> | 2017-04-24 22:03:14 -0600 |
| commit | d9fd363a6cbfae24ffaa00ac6fd3ce8e271acaf1 (patch) | |
| tree | 9139831824ebe9cf77d1bf836b558ee2061c0483 /kernel/sysctl.c | |
| parent | a44f53faf4674d84cba79f7ee574584e18ab8744 (diff) | |
| parent | 8f9cedc76fc7d9bc916127f8fe1287a249891d40 (diff) | |
Merge branch 'master' into for-4.12/post-merge
Diffstat (limited to 'kernel/sysctl.c')
| -rw-r--r-- | kernel/sysctl.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c index acf0a5a06da7..8c8714fcb53c 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -2133,9 +2133,12 @@ static int do_proc_douintvec_conv(bool *negp, unsigned long *lvalp, if (write) { if (*negp) return -EINVAL; + if (*lvalp > UINT_MAX) + return -EINVAL; *valp = *lvalp; } else { unsigned int val = *valp; + *negp = false; *lvalp = (unsigned long)val; } return 0; |
