]> git.karo-electronics.de Git - karo-tx-linux.git/commit
clockevents: Don't allow dummy broadcast timers
authorMark Rutland <mark.rutland@arm.com>
Thu, 7 Mar 2013 15:09:24 +0000 (15:09 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Mar 2013 19:18:01 +0000 (12:18 -0700)
commit66fe4de752ccbab09d3e30d2b551b92f475e8782
tree9483ad97835aa7ba128e7002eb3342a52367ed29
parent8d4fc92b7e49efae41a647dad100c618c60576e5
clockevents: Don't allow dummy broadcast timers

commit a7dc19b8652c862d5b7c4d2339bd3c428bd29c4a upstream.

Currently tick_check_broadcast_device doesn't reject clock_event_devices
with CLOCK_EVT_FEAT_DUMMY, and may select them in preference to real
hardware if they have a higher rating value. In this situation, the
dummy timer is responsible for broadcasting to itself, and the core
clockevents code may attempt to call non-existent callbacks for
programming the dummy, eventually leading to a panic.

This patch makes tick_check_broadcast_device always reject dummy timers,
preventing this problem.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: Jon Medhurst (Tixy) <tixy@linaro.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/time/tick-broadcast.c