Skip to content
Commit b9cc7d8a authored by Ben Dai's avatar Ben Dai Committed by Thomas Gleixner
Browse files

genirq/timings: Prevent potential array overflow in __irq_timings_store()



When the interrupt interval is greater than 2 ^ PREDICTION_BUFFER_SIZE *
PREDICTION_FACTOR us and less than 1s, the calculated index will be greater
than the length of irqs->ema_time[]. Check the calculated index before
using it to prevent array overflow.

Fixes: 23aa3b9a ("genirq/timings: Encapsulate storing function")
Signed-off-by: default avatarBen Dai <ben.dai@unisoc.com>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20210425150903.25456-1-ben.dai9703@gmail.com
parent ff363f48
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment