diff options
author | Thomas Gleixner <[email protected]> | 2009-09-14 23:37:40 +0200 |
---|---|---|
committer | Thomas Gleixner <[email protected]> | 2009-09-15 10:17:30 +0200 |
commit | 12e09337fe238981cb0c87543306e23775d1a143 (patch) | |
tree | 4c5052a801e6868ce2c701af10bf55f5ec5a4929 /net/lapb/lapb_in.c | |
parent | 54a6bc0b071c50150bc6d1da16c2cd9a963e288c (diff) |
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 <[email protected]>
Tested-by: Carsten Emde <[email protected]>
LKML-Reference: <new-submission>
Cc: Martin Schwidefsky <[email protected]>
Cc: John Stultz <[email protected]>
Diffstat (limited to 'net/lapb/lapb_in.c')
0 files changed, 0 insertions, 0 deletions