Skip to content

Commit aeed6ba

Browse files
KAGA-KOKOgregkh
authored andcommitted
clockevents: Set noop handler in clockevents_exchange_device()
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>
1 parent 5a64335 commit aeed6ba

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎kernel/time/clockevents.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,7 @@ void clockevents_exchange_device(struct clock_event_device *old,
286286
* released list and do a notify add later.
287287
*/
288288
if (old) {
289+
old->event_handler = clockevents_handle_noop;
289290
clockevents_set_mode(old, CLOCK_EVT_MODE_UNUSED);
290291
list_del(&old->list);
291292
list_add(&old->list, &clockevents_released);

0 commit comments

Comments
 (0)