]> git.baikalelectronics.ru Git - kernel.git/commit
sysctl: range checking in do_proc_dointvec_ms_jiffies_conv
authorFrancesco Fusco <ffusco@redhat.com>
Wed, 24 Jul 2013 08:39:07 +0000 (10:39 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 26 Jul 2013 21:22:10 +0000 (14:22 -0700)
commitc17cac0aa7db730b54e5ae0d21ae02195d52200d
tree0ed3038b6f7950d826ca0bc24a7e98f033f88b44
parent9bab497396022c3c9f31688016253447bd485fa3
sysctl: range checking in do_proc_dointvec_ms_jiffies_conv

When (integer) sysctl values are expressed in ms and have to be
represented internally as jiffies. The msecs_to_jiffies function
returns an unsigned long, which gets assigned to the integer.
This patch prevents the value to be assigned if bigger than
INT_MAX, done in a similar way as in cba9f3 ("Range checking in
do_proc_dointvec_(userhz_)jiffies_conv").

Signed-off-by: Francesco Fusco <ffusco@redhat.com>
CC: Andrew Morton <akpm@linux-foundation.org>
CC: linux-kernel@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
kernel/sysctl.c