lkml.org 
[lkml]   [2015]   [May]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: regression in ktime.h circa 3.16.0-rc5+ breaks lirc irsend, bad commit 166afb64511
On Fri, 1 May 2015, John Stultz wrote:

> So yea. I see the issue now. The ktime_divns() function uses do_div
> which is an unsigned divide. So negative numbers look like large
> numbers, and it doesn't do sign-extension, so when it divides we lose
> the sign bit.

That doesn't stop there. On 32-bit systems, if the divisor is not
constant or too large, then __ktime_divns() is used. If you look at the
code for __ktime_divns(), you'll notice it would get into an infinite
loop if you pass it a negative divisor.


Nicolas


\
 
 \ /
  Last update: 2015-05-01 21:01    [W:0.043 / U:0.744 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site