From: Thomas Gleixner Date: Mon, 14 Sep 2009 21:37:40 +0000 (+0200) Subject: time: Prevent 32 bit overflow with set_normalized_timespec() X-Git-Tag: v2.6.32-rc1~649^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=12e09337fe238981cb0c87543306e23775d1a143;p=pandora-kernel.git time: Prevent 32 bit overflow with set_normalized_timespec() set_normalized_timespec() nsec argument is of type long. The recent timekeeping changes of ktime_get_ts() feed ts->tv_nsec + tomono.tv_nsec + nsecs to set_normalized_timespec(). On 32 bit machines that sum can be larger than (1 << 31) and therefor result in a negative value which screws up the result completely. Make the nsec argument of set_normalized_timespec() s64 to fix the problem at hand. This also prevents similar problems for future users of set_normalized_timespec(). Signed-off-by: Thomas Gleixner Tested-by: Carsten Emde LKML-Reference: Cc: Martin Schwidefsky Cc: John Stultz --- Reading git-diff-tree failed