Skip to content

Commit

Permalink
clockevents: Set noop handler in clockevents_exchange_device()
Browse files Browse the repository at this point in the history
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 <[email protected]>
Cc: [email protected]
  • Loading branch information
KAGA-KOKO committed Dec 2, 2011
1 parent c1be843 commit de28f25
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 @@ -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);
Expand Down

0 comments on commit de28f25

Please sign in to comment.