Skip to content

Commit

Permalink
clockevents: Set noop handler in clockevents_exchange_device()
Browse files Browse the repository at this point in the history
commit de28f25 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 <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Thomas Gleixner authored and Greg Kroah-Hartman committed Dec 9, 2011
1 parent 4078977 commit b01b383
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions kernel/time/clockevents.c
Original file line number Diff line number Diff line change
Expand Up @@ -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_del(&old->list);
list_add(&old->list, &clockevents_released);
Expand Down

0 comments on commit b01b383

Please sign in to comment.