printk: Wait for the global console lock when the system is going down
[linux-2.6-microblaze.git] / kernel / reboot.c
index 4177645..3103636 100644 (file)
@@ -74,6 +74,7 @@ void kernel_restart_prepare(char *cmd)
 {
        blocking_notifier_call_chain(&reboot_notifier_list, SYS_RESTART, cmd);
        system_state = SYSTEM_RESTART;
+       try_block_console_kthreads(10000);
        usermodehelper_disable();
        device_shutdown();
 }
@@ -262,6 +263,7 @@ static void kernel_shutdown_prepare(enum system_states state)
        blocking_notifier_call_chain(&reboot_notifier_list,
                (state == SYSTEM_HALT) ? SYS_HALT : SYS_POWER_OFF, NULL);
        system_state = state;
+       try_block_console_kthreads(10000);
        usermodehelper_disable();
        device_shutdown();
 }