Skip to contentSkip to conversation

2.6.14-git4 suspend fails: kernel NULL pointer dereference

DISCUSSION Pavel Machek 3 participants 10 messages Nov 7, 2005 – Nov 9, 2005 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive

Hi!

Quoted 8 lines

echo shutdown > /sys/power/disk
echo disk > /sys/power/state

Unable to handle kernel NULL pointer dereference at virtual address 00000004
 printing eip:
EIP:    0060:[<c0132a5e>]    Not tainted VLI
EFLAGS: 00010286   (2.6.14-git4)

EIP is at enter_state+0xe/0x90

It works for me, with pretty recent tree. But I see a potential problem there, you are not using ACPI, right?

I think it is caused by this commit:

commit eb9289eb20df6b54214c45ac7c6bf5179a149026
tree dac51cecdd94e0c7273c990259ddd800057311b9
parent 0245b3e787dc3267a915e1f56419e7e9c197e148
author Shaohua Li <[email protected]> Sun, 30 Oct 2005 15:00:01 -0800
committer Linus Torvalds <[email protected]> Sun, 30 Oct 2005 17:37:15 -0800

[PATCH] introduce .valid callback for pm_ops

Add pm_ops.valid callback, so only the available pm states show in /sys/power/state. And this also makes an earlier states error
report at
enter_state before we do actual suspend/resume.

Try this patch.

Pavel

kernel/power/main.c +1 -1
@@ -167,7 +167,7 @@ static int enter_state(suspend_state_t s
 {
 	int error;
 
-	if (pm_ops->valid && !pm_ops->valid(state))
+	if (pm_ops && pm_ops->valid && !pm_ops->valid(state))
 		return -ENODEV;
 	if (down_trylock(&pm_sem))
 		return -EBUSY;
Signature · 1 line
Thanks, Sharp!
#2 lore raw

Pavel Machek ha scritto:

Quoted 47 lines

Hi!

Quoted 10 lines

echo shutdown > /sys/power/disk
echo disk > /sys/power/state

Unable to handle kernel NULL pointer dereference at virtual address 00000004
printing eip:
EIP:    0060:[<c0132a5e>]    Not tainted VLI
EFLAGS: 00010286   (2.6.14-git4)

EIP is at enter_state+0xe/0x90

It works for me, with pretty recent tree. But I see a potential problem there, you are not using ACPI, right?

I think it is caused by this commit:

commit eb9289eb20df6b54214c45ac7c6bf5179a149026
tree dac51cecdd94e0c7273c990259ddd800057311b9
parent 0245b3e787dc3267a915e1f56419e7e9c197e148
author Shaohua Li <[email protected]> Sun, 30 Oct 2005 15:00:01 -0800
committer Linus Torvalds <[email protected]> Sun, 30 Oct 2005 17:37:15 -0800

[PATCH] introduce .valid callback for pm_ops

Add pm_ops.valid callback, so only the available pm states show in /sys/power/state. And this also makes an earlier states error
report at
enter_state before we do actual suspend/resume.

Try this patch.

Pavel

kernel/power/main.c static int enter_state(suspend_state_t s · line 173

Quoted 8 lines
kernel/power/main.c +1 -1
@@ -167,7 +167,7 @@ static int enter_state(suspend_state_t s
 {
 	int error;
 
-	if (pm_ops->valid && !pm_ops->valid(state))
+	if (pm_ops && pm_ops->valid && !pm_ops->valid(state))
 		return -ENODEV;
 	if (down_trylock(&pm_sem))
 		return -EBUSY;

i'm using ACPI.
i'òll try the patch and report asap.

Patrizio

#3 lore raw

Hi!

Quoted 7 lines
Quoted 7 lines
kernel/power/main.c +0 -0
@@ -167,7 +167,7 @@ static int enter_state(suspend_state_t s
 {
 	int error;
 
Quoted 13 lines

kernel/power/main.c static int enter_state(suspend_state_t s · line 173

Quoted 9 lines
kernel/power/main.c +1 -1
-	if (pm_ops->valid && !pm_ops->valid(state))
+	if (pm_ops && pm_ops->valid && !pm_ops->valid(state))
 		return -ENODEV;
 	if (down_trylock(&pm_sem))
 		return -EBUSY;

i'm using ACPI.
i'?ll try the patch and report asap.

ok, not sure what is going on, then. Fill enter_state() with printks() so that we know where it fails... then kill klogd before attempting suspend.
Pavel

Signature · 1 line
Thanks, Sharp!
#5 lore raw
In reply to Pavel Machek
Quoted 5 lines · Pavel Machek

Hi!

Quoted 3 lines

echo shutdown > /sys/power/disk
echo disk > /sys/power/state

Quoted 9 lines
Quoted 5 lines
Unable to handle kernel NULL pointer dereference at virtual address 00000004
 printing eip:
EIP:    0060:[<c0132a5e>]    Not tainted VLI
EFLAGS: 00010286   (2.6.14-git4)

EIP is at enter_state+0xe/0x90

It works for me, with pretty recent tree. But I see a potential problem there, you are not using ACPI, right?

It's my bad. Thanks for fixing this, Pavel. Maybe patrizio didn't enable ACPI sleep.

Thanks,
Shaohua

#4 lore raw
In reply to Pavel Machek

Pavel Machek ha scritto:

Quoted 27 lines

Hi!

Quoted 7 lines
Quoted 7 lines
kernel/power/main.c +0 -0
@@ -167,7 +167,7 @@ static int enter_state(suspend_state_t s
 {
 	int error;
 
Quoted 15 lines

kernel/power/main.c static int enter_state(suspend_state_t s · line 173

Quoted 11 lines
kernel/power/main.c +1 -1
-	if (pm_ops->valid && !pm_ops->valid(state))
+	if (pm_ops && pm_ops->valid && !pm_ops->valid(state))
 		return -ENODEV;
 	if (down_trylock(&pm_sem))
 		return -EBUSY;

i'm using ACPI.
i'?ll try the patch and report asap.

Quoted 6 lines

ok, not sure what is going on, then. Fill enter_state() with printks() so that we know where it fails... then kill klogd before attempting suspend.
Pavel

that **seems** to be fixed, even if i run ACPI.

now i have

Stopping tasks:
===============================================================| Freeing memory... done (42120 pages freed)
usbfs 2-2:1.0: no suspend?
Could not suspend device 2-2: error -16
Some devices failed to suspend
Restarting tasks... done

this was fixed by a patch Len Brown gave me privatly. it's due to a pci-usb card.
it seems has not been applied yet.
can you notify him? he knows :)

good job.

Patrizio

#6 lore raw
In reply to Shaohua Li

Shaohua Li ha scritto:

Quoted 22 lines · Pavel Machek
Quoted 16 lines

Hi!

Quoted 10 lines

echo shutdown > /sys/power/disk
echo disk > /sys/power/state

Unable to handle kernel NULL pointer dereference at virtual address 00000004
printing eip:
EIP:    0060:[<c0132a5e>]    Not tainted VLI
EFLAGS: 00010286   (2.6.14-git4)

EIP is at enter_state+0xe/0x90

Quoted 5 lines

It works for me, with pretty recent tree. But I see a potential problem there, you are not using ACPI, right?

Quoted 9 lines

It's my bad. Thanks for fixing this, Pavel. Maybe patrizio didn't enable ACPI sleep.

Thanks,
Shaohua

no i hadn't.

#
# ACPI (Advanced Configuration and Power Interface) Support #
CONFIG_ACPI=y
# CONFIG_ACPI_SLEEP is not set
# CONFIG_ACPI_AC is not set
# CONFIG_ACPI_BATTERY is not set CONFIG_ACPI_BUTTON=y
# CONFIG_ACPI_VIDEO is not set
# CONFIG_ACPI_HOTKEY is not set
# CONFIG_ACPI_FAN is not set
# CONFIG_ACPI_PROCESSOR is not set
# CONFIG_ACPI_ASUS is not set
# CONFIG_ACPI_IBM is not set
# CONFIG_ACPI_TOSHIBA is not set
# CONFIG_ACPI_CUSTOM_DSDT is not set CONFIG_ACPI_BLACKLIST_YEAR=0
# CONFIG_ACPI_DEBUG is not set
CONFIG_ACPI_EC=y
CONFIG_ACPI_POWER=y
CONFIG_ACPI_SYSTEM=y
# CONFIG_X86_PM_TIMER is not set
# CONFIG_ACPI_CONTAINER is not set

#
# APM (Advanced Power Management) BIOS Support
#
# CONFIG_APM is not set

#7 lore raw
In reply to Shaohua Li

Hi!

Quoted 9 lines
Quoted 9 lines
Quoted 8 lines

echo shutdown > /sys/power/disk
echo disk > /sys/power/state

Unable to handle kernel NULL pointer dereference at virtual address 00000004
 printing eip:
EIP:    0060:[<c0132a5e>]    Not tainted VLI
EFLAGS: 00010286   (2.6.14-git4)

EIP is at enter_state+0xe/0x90

Quoted 5 lines
Quoted 2 lines

It works for me, with pretty recent tree. But I see a potential problem there, you are not using ACPI, right?

It's my bad. Thanks for fixing this, Pavel. Maybe patrizio didn't enable ACPI sleep.

Will you take care of pushing that patch to mainline?
Pavel

Signature · 1 line
Thanks, Sharp!
#8 lore raw

Pavel Machek ha scritto:

Quoted 21 lines

Hi!

Quoted 14 lines
Quoted 14 lines
Quoted 10 lines

echo shutdown > /sys/power/disk
echo disk > /sys/power/state

Unable to handle kernel NULL pointer dereference at virtual address 00000004
printing eip:
EIP:    0060:[<c0132a5e>]    Not tainted VLI
EFLAGS: 00010286   (2.6.14-git4)

EIP is at enter_state+0xe/0x90

It works for me, with pretty recent tree. But I see a potential problem there, you are not using ACPI, right?

Quoted 9 lines
Quoted 4 lines

It's my bad. Thanks for fixing this, Pavel. Maybe patrizio didn't enable ACPI sleep.

Will you take care of pushing that patch to mainline?
Pavel

i'm so sorry, had a hd problem, i've only got the compiled vmlinux

:(((

infact i seached to apply to vanilla kernel.

however Len Brown told me he would have applied such patch for 2.6.15

please contact him

Patrizio

#9 lore raw

Hi!

Quoted 10 lines
Quoted 6 lines
Quoted 4 lines

It's my bad. Thanks for fixing this, Pavel. Maybe patrizio didn't enable ACPI sleep.

Will you take care of pushing that patch to mainline?

i'm so sorry, had a hd problem, i've only got the compiled vmlinux

:(((

That's okay, I was talking to Shaohua. It has already been taken care of.
Pavel

Signature · 1 line
Thanks, Sharp!
#10 lore raw

Pavel Machek ha scritto:

Quoted 18 lines

Hi!

Quoted 14 lines
Quoted 9 lines
Quoted 6 lines

It's my bad. Thanks for fixing this, Pavel. Maybe patrizio didn't enable ACPI sleep.

Will you take care of pushing that patch to mainline?

i'm so sorry, had a hd problem, i've only got the compiled vmlinux

Quoted 9 lines
Quoted 3 lines

:(((

That's okay, I was talking to Shaohua. It has already been taken care of.
Pavel

ok,

please notice me when it gets merged in a git release, so i can test.

Patrizio