fix cputime overflow in uptime_proc_show
commit3ec3f83aee534f732fd7012ff6c04776952e47fd
authorMartin Schwidefsky <schwidefsky@de.ibm.com>
Thu, 15 Dec 2011 13:56:10 +0000 (15 14:56 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 26 Jan 2012 01:24:53 +0000 (25 17:24 -0800)
tree5de4f91d61a4d454eefa352ff18716a5dd0a055c
parent277a05f83af8c82291cf5f2ad0c2dd1aa6f29de7
fix cputime overflow in uptime_proc_show

commit c3e0ef9a298e028a82ada28101ccd5cf64d209ee upstream.

For 32-bit architectures using standard jiffies the idletime calculation
in uptime_proc_show will quickly overflow. It takes (2^32 / HZ) seconds
of idle-time, or e.g. 12.45 days with no load on a quad-core with HZ=1000.
Switch to 64-bit calculations.

Cc: Michael Abbott <michael.abbott@diamond.ac.uk>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/proc/uptime.c