aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/sysctl.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index ac09d98490aa..07f6fc468e17 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -2346,7 +2346,11 @@ static int do_proc_dointvec_ms_jiffies_conv(bool *negp, unsigned long *lvalp,
2346 int write, void *data) 2346 int write, void *data)
2347{ 2347{
2348 if (write) { 2348 if (write) {
2349 *valp = msecs_to_jiffies(*negp ? -*lvalp : *lvalp); 2349 unsigned long jif = msecs_to_jiffies(*negp ? -*lvalp : *lvalp);
2350
2351 if (jif > INT_MAX)
2352 return 1;
2353 *valp = (int)jif;
2350 } else { 2354 } else {
2351 int val = *valp; 2355 int val = *valp;
2352 unsigned long lval; 2356 unsigned long lval;