zengtao 0f26922fe5 cputime: Prevent 32bit overflow in time[val|spec]_to_cputime()
The datatype __kernel_time_t is u32 on 32bit platform, so its subject to
overflows in the timeval/timespec to cputime conversion.

Currently the following functions are affected:
1. setitimer()
2. timer_create/timer_settime()
3. sys_clock_nanosleep

This can happen on MIPS32 and ARM32 with "Full dynticks CPU time accounting"
enabled, which is required for CONFIG_NO_HZ_FULL.

Enforce u64 conversion to prevent the overflow.

Fixes: 31c1fc818715 ("ARM: Kconfig: allow full nohz CPU accounting")
Signed-off-by: zengtao <prime.zeng@huawei.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Cc: <fweisbec@gmail.com>
Cc: stable@vger.kernel.org
Link: http://lkml.kernel.org/r/1454384314-154784-1-git-send-email-prime.zeng@huawei.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2016-02-02 15:24:38 +01:00
..
2015-07-27 14:06:24 +02:00
2014-04-07 16:36:10 -07:00
2009-06-11 21:02:42 +02:00
2011-03-17 09:19:04 +08:00
2015-05-12 10:46:53 +02:00
2010-10-07 14:08:55 +01:00
2010-10-07 14:08:55 +01:00
2012-10-02 18:01:56 +01:00
2011-07-26 16:49:47 -07:00
2011-07-26 16:49:47 -07:00
2012-12-09 23:14:14 +01:00
2014-11-23 13:01:47 +01:00
2013-01-03 15:57:16 -08:00
2015-08-25 09:59:45 +02:00
2015-11-10 16:32:11 -08:00
2014-06-17 19:12:40 -04:00
2014-05-15 00:32:09 +01:00
2015-09-05 13:19:09 +02:00
2013-11-09 00:16:29 -05:00
2012-11-29 00:01:23 -05:00
2013-02-14 09:21:15 -05:00
2015-11-23 09:44:58 +01:00
2009-06-11 21:02:42 +02:00