OSDN Git Service

alarmtimers: Avoid possible denial of service with high freq periodic timers
authorJohn Stultz <john.stultz@linaro.org>
Wed, 10 Aug 2011 17:26:09 +0000 (10:26 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 3 Oct 2011 18:40:07 +0000 (11:40 -0700)
commitc3a44b4d23f4cb1b3eafb8c2c74d88f452d50a6d
tree1ae49d74350fd3febbc73b1516924bc7faed7e7d
parent0898dd1603e1dec711217b85329c031b30f81710
alarmtimers: Avoid possible denial of service with high freq periodic timers

commit 6af7e471e5a7746b8024d70b4363d3dfe41d36b8 upstream.

Its possible to jam up the alarm timers by setting very small interval
timers, which will cause the alarmtimer subsystem to spend all of its time
firing and restarting timers. This can effectivly lock up a box.

A deeper fix is needed, closely mimicking the hrtimer code, but for now
just cap the interval to 100us to avoid userland hanging the system.

CC: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
kernel/time/alarmtimer.c