summaryrefslogtreecommitdiffstats
path: root/kernel/time
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2011-12-02 16:02:45 +0100
committerThomas Gleixner <tglx@linutronix.de>2011-12-02 16:07:23 +0100
commitde28f25e8244c7353abed8de0c7792f5f883588c (patch)
tree03f94969b51c454f5da2b52cc311e510c28c2080 /kernel/time
parentc1be84309c58b1e7c6d626e28fba41a22b364c3d (diff)
downloadlinux-de28f25e8244c7353abed8de0c7792f5f883588c.tar.gz
linux-de28f25e8244c7353abed8de0c7792f5f883588c.tar.bz2
linux-de28f25e8244c7353abed8de0c7792f5f883588c.zip
clockevents: Set noop handler in clockevents_exchange_device()
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 <tglx@linutronix.de> Cc: stable@vger.kernel.org
Diffstat (limited to 'kernel/time')
-rw-r--r--kernel/time/clockevents.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/time/clockevents.c b/kernel/time/clockevents.c
index 1ecd6ba36d6c..c4eb71c8b2ea 100644
--- a/kernel/time/clockevents.c
+++ b/kernel/time/clockevents.c
@@ -387,6 +387,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_del(&old->list);
list_add(&old->list, &clockevents_released);