summaryrefslogtreecommitdiffstats
path: root/drivers/virt
diff options
context:
space:
mode:
authorGao Feng2017-05-09 00:54:58 +0200
committerLinus Torvalds2017-05-09 02:15:10 +0200
commit63259457a2eea54cc3b3a284b4bc7da52398a19a (patch)
tree8e559f0586a162ad6d07b42117254f26cf552824 /drivers/virt
parentfs/proc/inode.c: remove cast from memory allocation (diff)
downloadkernel-qcow2-linux-63259457a2eea54cc3b3a284b4bc7da52398a19a.tar.gz
kernel-qcow2-linux-63259457a2eea54cc3b3a284b4bc7da52398a19a.tar.xz
kernel-qcow2-linux-63259457a2eea54cc3b3a284b4bc7da52398a19a.zip
proc/sysctl: fix the int overflow for jiffies conversion
do_proc_dointvec_jiffies_conv() uses LONG_MAX/HZ as the max value to avoid overflow. But actually the *valp is int type, so it still causes overflow. For example, echo 2147483647 > ./sys/net/ipv4/tcp_keepalive_time Then, cat ./sys/net/ipv4/tcp_keepalive_time The output is "-1", it is not expected. Now use INT_MAX/HZ as the max value instead LONG_MAX/HZ to fix it. Link: http://lkml.kernel.org/r/1490109532-9228-1-git-send-email-fgao@ikuai8.com Signed-off-by: Gao Feng <fgao@ikuai8.com> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Alexey Dobriyan <adobriyan@gmail.com> Cc: Eric Dumazet <edumazet@google.com> Cc: Josh Poimboeuf <jpoimboe@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/virt')
0 files changed, 0 insertions, 0 deletions