Bug 95431
Summary: | regression in ktime.h circa 3.16.0-rc5+ breaks lirc irsend, bad commit 166afb64511 | ||
---|---|---|---|
Product: | Timers | Reporter: | Trevor Cordes (kernelbugs) |
Component: | Other | Assignee: | john stultz (john.stultz) |
Status: | CLOSED CODE_FIX | ||
Severity: | normal | ||
Priority: | P1 | ||
Hardware: | i386 | ||
OS: | Linux | ||
See Also: | https://bugzilla.redhat.com/show_bug.cgi?id=1200353 | ||
Kernel Version: | kernel-PAE-3.19.1-201.fc21.i686 | Subsystem: | |
Regression: | Yes | Bisected commit-id: | |
Attachments: | (probably) final patch to fix this bug, from John Stultz @ LKML |
Description
Trevor Cordes
2015-03-24 19:49:51 UTC
Created attachment 176431 [details]
(probably) final patch to fix this bug, from John Stultz @ LKML
LKML guys helped me out and came up with a "real" patch that solves this bug. Here is the writeup from John Stultz: " It was noted that the 32bit implementation of ktime_divns() was doing unsigned division and didn't properly handle negative values. And when a ktime helper was changed to utilize ktime_divns, it caused a regression on some IR blasters. See the following bugzilla for details: https://bugzilla.redhat.com/show_bug.cgi?id=1200353 This patch fixes the problem in ktime_divns by checking and preserving the sign bit, and then reapplying it if appropriate after the division, it also changes the return type to a s64 to make it more obvious this is expected. Nicolas also pointed out that negative dividers would cause infinite loops on 32bit systems, negative dividers is unlikely for users of this function, but out of caution this patch adds checks for negative dividers for both 32-bit (BUG_ON) and 64-bit(WARN_ON) versions to make sure no such use cases creep in. " This bug is probably fixed now. Will close this bug when it appears that the patch has been accepted. Thanks everyone! This bug is now fixed in stock Fedora 21 kernel (4.0.4-202.fc21.i686+PAE). I assume that means it is also committed to vanilla. As such I'll mark this ticket as closed. Please see the RHBZ (link at top) for more details. Thanks everyone!! |