diff options
author | Daniel Lezcano <daniel.lezcano@linaro.org> | 2019-05-27 22:55:15 +0200 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2019-06-12 10:47:03 +0200 |
commit | 2840eef0513c518faeb8a0ab8d07268c6285cdd0 (patch) | |
tree | 81162750a160b1148e42174579c814f33b1a98f0 /.gitattributes | |
parent | genirq/timings: Fix next event index function (diff) | |
download | linux-2840eef0513c518faeb8a0ab8d07268c6285cdd0.tar.xz linux-2840eef0513c518faeb8a0ab8d07268c6285cdd0.zip |
genirq/timings: Fix timings buffer inspection
It appears the index beginning computation is not correct, the current
code does:
i = (irqts->count & IRQ_TIMINGS_MASK) - 1
If irqts->count is equal to zero, we end up with an index equal to -1,
but that does not happen because the function checks against zero
before and returns in such case.
However, if irqts->count is a multiple of IRQ_TIMINGS_SIZE, the
resulting & bit op will be zero and leads also to a -1 index.
Re-introduce the iteration loop belonging to the previous variance
code which was correct.
Fixes: bbba0e7c5cda "genirq/timings: Add array suffix computation code"
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: andriy.shevchenko@linux.intel.com
Link: https://lkml.kernel.org/r/20190527205521.12091-3-daniel.lezcano@linaro.org
Diffstat (limited to '.gitattributes')
0 files changed, 0 insertions, 0 deletions