Re: [PATCH] ktime_add_ns() may overflow on 32bit architectures

2013-04-09 Thread David Engraf
Am 08.04.2013 22:20, schrieb John Stultz: On 03/19/2013 05:29 AM, David Engraf wrote: Hello, I've triggered an overflow when using ktime_add_ns() on a 32bit architecture not supporting CONFIG_KTIME_SCALAR. When passing a very high value for u64 nsec, e.g. 7881299347898368000 the do_div() funct

Re: [PATCH] ktime_add_ns() may overflow on 32bit architectures

2013-04-08 Thread John Stultz
On 03/19/2013 05:29 AM, David Engraf wrote: Hello, I've triggered an overflow when using ktime_add_ns() on a 32bit architecture not supporting CONFIG_KTIME_SCALAR. When passing a very high value for u64 nsec, e.g. 7881299347898368000 the do_div() function converts this value to seconds (7881

Re: [PATCH] ktime_add_ns() may overflow on 32bit architectures

2013-03-19 Thread David Engraf
Am 19.03.2013 13:38, schrieb Eric Dumazet: On Tue, 2013-03-19 at 13:29 +0100, David Engraf wrote: Hello, I've triggered an overflow when using ktime_add_ns() on a 32bit architecture not supporting CONFIG_KTIME_SCALAR. When passing a very high value for u64 nsec, e.g. 7881299347898368000 the do

Re: [PATCH] ktime_add_ns() may overflow on 32bit architectures

2013-03-19 Thread Eric Dumazet
On Tue, 2013-03-19 at 13:29 +0100, David Engraf wrote: > Hello, > > I've triggered an overflow when using ktime_add_ns() on a 32bit > architecture not supporting CONFIG_KTIME_SCALAR. > > When passing a very high value for u64 nsec, e.g. 7881299347898368000 > the do_div() function converts this

[PATCH] ktime_add_ns() may overflow on 32bit architectures

2013-03-19 Thread David Engraf
Hello, I've triggered an overflow when using ktime_add_ns() on a 32bit architecture not supporting CONFIG_KTIME_SCALAR. When passing a very high value for u64 nsec, e.g. 7881299347898368000 the do_div() function converts this value to seconds (7881299347) which is still to high to pass to th