summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/sysctl.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 5f3a51614ecf..002ec084124b 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -2067,6 +2067,8 @@ 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;