Re: Dumb question: BKL on reboot ?

From: Andi Kleen
Date: Wed Aug 20 2003 - 05:51:55 EST


Hannes Reinecke <Hannes.Reinecke@xxxxxxx> writes:

> I've got a dumb question: Why is the BKL held on entering sys_reboot()
> in kernel/sys.c:405 ?

Interesting. I have a few SMP deadlocks on x86-64 in reboot too
and it's possible that it is the same problem.

I would hold it during exection of the notifiers, but drop
it before calling into machine_*

-Andi

--- linux-2.6.0test3-amd64/kernel/sys.c-o 2003-07-28 19:18:18.000000000 +0200
+++ linux-2.6.0test3-amd64/kernel/sys.c 2003-08-20 12:48:59.000000000 +0200
@@ -409,6 +409,7 @@
system_running = 0;
device_shutdown();
printk(KERN_EMERG "Restarting system.\n");
+ unlock_kernel();
machine_restart(NULL);
break;

@@ -425,8 +426,8 @@
system_running = 0;
device_shutdown();
printk(KERN_EMERG "System halted.\n");
- machine_halt();
unlock_kernel();
+ machine_halt();
do_exit(0);
break;

@@ -435,8 +436,8 @@
system_running = 0;
device_shutdown();
printk(KERN_EMERG "Power down.\n");
- machine_power_off();
unlock_kernel();
+ machine_power_off();
do_exit(0);
break;

@@ -451,6 +452,7 @@
system_running = 0;
device_shutdown();
printk(KERN_EMERG "Restarting system with command '%s'.\n", buffer);
+ unlock_kernel();
machine_restart(buffer);
break;

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/