浏览代码

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
Thomas Gleixner 13 年之前
父节点
当前提交
de28f25e82
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      kernel/time/clockevents.c

+ 1 - 0
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.
 	 * released list and do a notify add later.
 	 */
 	 */
 	if (old) {
 	if (old) {
+		old->event_handler = clockevents_handle_noop;
 		clockevents_set_mode(old, CLOCK_EVT_MODE_UNUSED);
 		clockevents_set_mode(old, CLOCK_EVT_MODE_UNUSED);
 		list_del(&old->list);
 		list_del(&old->list);
 		list_add(&old->list, &clockevents_released);
 		list_add(&old->list, &clockevents_released);