Re: regression in ktime.h circa 3.16.0-rc5+ breaks lirc irsend, bad commit 166afb64511

From: John Stultz
Date: Thu Apr 30 2015 - 12:35:14 EST


On Wed, Apr 29, 2015 at 9:27 PM, Trevor Cordes <trevor@xxxxxxxxxxxxx> wrote:
> Sorry for the top-posting; Josh Boyer suggested I re-mail this mail
> from last month which didn't get any replies. I'm still having this
> weird kernel bug affecting me and I've bisected it down to like 2-4
> lines of code. (I've thought more about my theory regarding
> unsigned/signed below and it's probably wrong, so ignore my
> prognosticating.) Please see my rhbz link near the bottom for the full
> details.

Thanks so much for the report and all the effort to chase down this regression!

>From your description it does seem like some sort of edge case problem
w/ the 32bit ktime_divns(), but I don't see it right off, and I agree
with Alan to do both calculations and print out warn when that
happens.

There's also not a ton of users of that function, but ktime_us_delta()
is used in drivers/media/rc/ir-lirc-codec.c, which makes use of it in
ir_lirc_transmit_ir().

We should instrument that to see if its calculating negative deltas.

I'll send you a debug patch to do the above.

thanks
-john
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/