2.4.23-pre2 BUG() - ACPI + sysrq power_off

From: Krzysztof Halasa
Date: Fri Sep 12 2003 - 05:00:42 EST


Hi,

With 2.4.23-pre2 (and with some older kernels as well) I get BUG()
after pressing sysrq+Off (power off) with ACPI.

kernel/pm.c (line 159):

int pm_send(struct pm_dev *dev, pm_request_t rqst, void *data)
{
int status = 0;
int prev_state, next_state;

if (in_interrupt())
BUG(); <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

switch (rqst) {
case PM_SUSPEND:
case PM_RESUME:
prev_state = dev->state;
next_state = (unsigned long) data;
if (prev_state != next_state) {
if (dev->callback)
status = (*dev->callback)(dev, rqst, data);
if (!status) {
dev->state = next_state;
dev->prev_state = prev_state;
}
}
else {
dev->prev_state = prev_state;
}
break;
default:
if (dev->callback)
status = (*dev->callback)(dev, rqst, data);
break;
}
return status;
}

It seems sysrq-O routine (acpi_sysrq_power_off() -> acpi_power_off() ->
acpi_suspend(ACPI_STATE_S5)) calls pm_send() from keyboard interrupt,
which isn't exactly what pm_send() like.

Details available on request, if needed.
Not checked with 2.6test yet.


Another thing: on my notebook, /sbin/poweroff doesn't power the machine
off with 2.4 (it worked with older 2.4 kernels). echo 5 > /proc/acpi/sleep
does the job. Any ideas?
--
Krzysztof Halasa, B*FH
-
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/