path: root/kernel
diff options
authorThomas Gleixner <>2011-12-02 16:02:45 +0100
committerGreg Kroah-Hartman <>2011-12-09 08:55:56 -0800
commitaeed6baa702a285cf03b7dc4182ffc1a7f4e4ed6 (patch)
treeff7342788f5b72d834279916ab9f4f469fac20a5 /kernel
parent5a643352d2166077f88180372431ea5e90212b15 (diff)
clockevents: Set noop handler in clockevents_exchange_device()
commit de28f25e8244c7353abed8de0c7792f5f883588c upstream. If a device is shutdown, then there might be a pending interrupt, which will be processed after we reenable interrupts, which causes the original handler to be run. If the old handler is the (broadcast) periodic handler the shutdown state might hang the kernel completely. Signed-off-by: Thomas Gleixner <> Signed-off-by: Greg Kroah-Hartman <>
Diffstat (limited to 'kernel')
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/time/clockevents.c b/kernel/time/clockevents.c
index e4c699dfa4e8..13dfaaba4061 100644
--- a/kernel/time/clockevents.c
+++ b/kernel/time/clockevents.c
@@ -286,6 +286,7 @@ void clockevents_exchange_device(struct clock_event_device *old,
* released list and do a notify add later.
if (old) {
+ old->event_handler = clockevents_handle_noop;
clockevents_set_mode(old, CLOCK_EVT_MODE_UNUSED);
list_add(&old->list, &clockevents_released);