]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
clockevents: Set noop handler in clockevents_exchange_device()
authorThomas Gleixner <tglx@linutronix.de>
Fri, 2 Dec 2011 15:02:45 +0000 (16:02 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Fri, 2 Dec 2011 15:07:23 +0000 (16:07 +0100)
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
kernel/time/clockevents.c

index 1ecd6ba36d6c6d3d0ce404450878ea5da047e01d..c4eb71c8b2ea3290c6b83f2f6d72b3c8c62a7787 100644 (file)
@@ -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);