clockevents: Don't allow dummy broadcast timers
authorMark Rutland <mark.rutland@arm.com>
Thu, 7 Mar 2013 15:09:24 +0000 (15:09 +0000)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 7 Mar 2013 16:16:11 +0000 (17:16 +0100)
commita7dc19b8652c862d5b7c4d2339bd3c428bd29c4a
treecc31aa42ae65ec413ae1ee586307cf8687fdbc92
parent6dbe51c251a327e012439c4772097a13df43c5b8
clockevents: Don't allow dummy broadcast timers

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>
Cc: stable@vger.kernel.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
kernel/time/tick-broadcast.c