Files
i2som-imx-linux/kernel
Thomas Gleixner cf1d7205ef alarmtimer: Prevent overflow of relative timers
commit f4781e76f9 upstream.

Andrey reported a alartimer related RCU stall while fuzzing the kernel with
syzkaller.

The reason for this is an overflow in ktime_add() which brings the
resulting time into negative space and causes immediate expiry of the
timer. The following rearm with a small interval does not bring the timer
back into positive space due to the same issue.

This results in a permanent firing alarmtimer which hogs the CPU.

Use ktime_add_safe() instead which detects the overflow and clamps the
result to KTIME_SEC_MAX.

Reported-by: Andrey Konovalov <andreyknvl@google.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Kostya Serebryany <kcc@google.com>
Cc: syzkaller <syzkaller@googlegroups.com>
Cc: John Stultz <john.stultz@linaro.org>
Cc: Dmitry Vyukov <dvyukov@google.com>
Link: http://lkml.kernel.org/r/20170530211655.802921648@linutronix.de
[bwh: Backported to 3.2: drop change in alarm_start_relative()]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
2017-09-15 18:30:49 +01:00
..
2016-01-22 21:40:09 +00:00
2014-12-14 16:23:56 +00:00
2014-11-05 20:27:46 +00:00
2017-08-26 02:13:59 +01:00
2013-01-03 03:33:08 +00:00
2012-07-12 04:31:59 +01:00
2014-06-09 13:29:04 +01:00