linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* 2.6.14-git4 suspend fails: kernel NULL pointer dereference
@ 2005-11-03  9:09 Patrizio Bassi
  0 siblings, 0 replies; 11+ messages in thread
From: Patrizio Bassi @ 2005-11-03  9:09 UTC (permalink / raw)
  To: Kernel, 

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

Unable to handle kernel NULL pointer dereference at virtual address 00000004
 printing eip:
c0132a5e
*pde = 00000000
Oops: 0000 [#1]
Modules linked in:
CPU:    0
EIP:    0060:[<c0132a5e>]    Not tainted VLI
EFLAGS: 00010286   (2.6.14-git4)
EIP is at enter_state+0xe/0x90
eax: 00000000   ebx: c03b1178   ecx: ffffffff   edx: d1c25000
esi: 00000004   edi: c03b117c   ebp: 00000004   esp: ddf09ef0
ds: 007b   es: 007b   ss: 0068
Process bash (pid: 21862, threadinfo=ddf08000 task=dcf9b540)
Stack: c03e82cc c03b1178 d1c25004 c0132c4c 00000004 00000004 00000000
00000001
       c03e7de0 c03e7e34 ddf09fa4 b7d4c000 c018c6d7 c03e7de0 d1c25000
00000005
       c03eb460 c018c97e c03e7df0 c03e7e34 d1c25000 00000005 d62d4c60
d3ef8980
Call Trace:
 [<c0132c4c>] state_store+0x9c/0xaf
 [<c018c6d7>] subsys_attr_store+0x37/0x40
 [<c018c97e>] flush_write_buffer+0x3e/0x50
 [<c018c9e9>] sysfs_write_file+0x59/0x80
 [<c0155f8c>] vfs_write+0x14c/0x160
 [<c0156071>] sys_write+0x51/0x80
 [<c0102cbf>] sysenter_past_esp+0x54/0x75
Code: ff 50 10 e8 75 04 00 00 58 5b e9 ce 05 00 00 8d b4 26 00 00 00 00
8d bc 27 00 00 00 00 56 53 83 ec 04 a1 00 e0 48 c0 8b 74 24 10 <8b> 58
04 85 db 75 52 ff 0d a0 7d 3e c0 0f 88 0e 02 00 00 31 c0



i had 2.6.14-rc2-git4 working, didn't try other rc releases.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: 2.6.14-git4 suspend fails: kernel NULL pointer dereference
       [not found] <20051006072749.GA2393@spitz.ucw.cz>
@ 2005-11-07 16:47 ` Pavel Machek
  2005-11-07 18:04   ` Patrizio Bassi
  2005-11-08  1:02   ` Shaohua Li
  0 siblings, 2 replies; 11+ messages in thread
From: Pavel Machek @ 2005-11-07 16:47 UTC (permalink / raw)
  To: kernel list, patrizio.bassi; +Cc: shaohua.li

Hi!

> 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 <shaohua.li@intel.com> Sun, 30 Oct 2005 15:00:01
-0800
committer Linus Torvalds <torvalds@g5.osdl.org> 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

diff --git a/kernel/power/main.c b/kernel/power/main.c
--- a/kernel/power/main.c
+++ b/kernel/power/main.c
@@ -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;


-- 
Thanks, Sharp!

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: 2.6.14-git4 suspend fails: kernel NULL pointer dereference
  2005-11-07 16:47 ` 2.6.14-git4 suspend fails: kernel NULL pointer dereference Pavel Machek
@ 2005-11-07 18:04   ` Patrizio Bassi
  2005-11-07 18:07     ` Pavel Machek
  2005-11-08  1:02   ` Shaohua Li
  1 sibling, 1 reply; 11+ messages in thread
From: Patrizio Bassi @ 2005-11-07 18:04 UTC (permalink / raw)
  To: Pavel Machek; +Cc: kernel list, shaohua.li

Pavel Machek ha scritto:

>Hi!
>
>  
>
>>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 <shaohua.li@intel.com> Sun, 30 Oct 2005 15:00:01
>-0800
>committer Linus Torvalds <torvalds@g5.osdl.org> 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
>
>diff --git a/kernel/power/main.c b/kernel/power/main.c
>--- a/kernel/power/main.c
>+++ b/kernel/power/main.c
>@@ -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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: 2.6.14-git4 suspend fails: kernel NULL pointer dereference
  2005-11-07 18:04   ` Patrizio Bassi
@ 2005-11-07 18:07     ` Pavel Machek
  2005-11-08  7:50       ` Patrizio Bassi
  0 siblings, 1 reply; 11+ messages in thread
From: Pavel Machek @ 2005-11-07 18:07 UTC (permalink / raw)
  To: Patrizio Bassi; +Cc: kernel list, shaohua.li

Hi!

> >diff --git a/kernel/power/main.c b/kernel/power/main.c
> >--- a/kernel/power/main.c
> >+++ b/kernel/power/main.c
> >@@ -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.

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
-- 
Thanks, Sharp!

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: 2.6.14-git4 suspend fails: kernel NULL pointer dereference
  2005-11-07 16:47 ` 2.6.14-git4 suspend fails: kernel NULL pointer dereference Pavel Machek
  2005-11-07 18:04   ` Patrizio Bassi
@ 2005-11-08  1:02   ` Shaohua Li
  2005-11-08  7:52     ` Patrizio Bassi
  2005-11-08  9:12     ` Pavel Machek
  1 sibling, 2 replies; 11+ messages in thread
From: Shaohua Li @ 2005-11-08  1:02 UTC (permalink / raw)
  To: Pavel Machek; +Cc: kernel list, patrizio.bassi

On Mon, 2005-11-07 at 17:47 +0100, Pavel Machek wrote:
> Hi!
> 
> > 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?
> 
It's my bad. Thanks for fixing this, Pavel. Maybe patrizio didn't enable
ACPI sleep.

Thanks,
Shaohua


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: 2.6.14-git4 suspend fails: kernel NULL pointer dereference
  2005-11-07 18:07     ` Pavel Machek
@ 2005-11-08  7:50       ` Patrizio Bassi
  0 siblings, 0 replies; 11+ messages in thread
From: Patrizio Bassi @ 2005-11-08  7:50 UTC (permalink / raw)
  To: Pavel Machek; +Cc: kernel list, shaohua.li

Pavel Machek ha scritto:

>Hi!
>
>  
>
>>>diff --git a/kernel/power/main.c b/kernel/power/main.c
>>>--- a/kernel/power/main.c
>>>+++ b/kernel/power/main.c
>>>@@ -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.
>>    
>>
>
>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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: 2.6.14-git4 suspend fails: kernel NULL pointer dereference
  2005-11-08  1:02   ` Shaohua Li
@ 2005-11-08  7:52     ` Patrizio Bassi
  2005-11-08  9:12     ` Pavel Machek
  1 sibling, 0 replies; 11+ messages in thread
From: Patrizio Bassi @ 2005-11-08  7:52 UTC (permalink / raw)
  To: Shaohua Li; +Cc: Pavel Machek, kernel list

Shaohua Li ha scritto:

>On Mon, 2005-11-07 at 17:47 +0100, Pavel Machek wrote:
>  
>
>>Hi!
>>
>>    
>>
>>>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?
>>
>>    
>>
>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



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: 2.6.14-git4 suspend fails: kernel NULL pointer dereference
  2005-11-08  1:02   ` Shaohua Li
  2005-11-08  7:52     ` Patrizio Bassi
@ 2005-11-08  9:12     ` Pavel Machek
  2005-11-08 15:19       ` Patrizio
  1 sibling, 1 reply; 11+ messages in thread
From: Pavel Machek @ 2005-11-08  9:12 UTC (permalink / raw)
  To: Shaohua Li; +Cc: kernel list, patrizio.bassi

Hi!

> > > 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?

> 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
-- 
Thanks, Sharp!

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: 2.6.14-git4 suspend fails: kernel NULL pointer dereference
  2005-11-08  9:12     ` Pavel Machek
@ 2005-11-08 15:19       ` Patrizio
  2005-11-08 21:48         ` Pavel Machek
  0 siblings, 1 reply; 11+ messages in thread
From: Patrizio @ 2005-11-08 15:19 UTC (permalink / raw)
  To: Pavel Machek; +Cc: Shaohua Li, kernel list

Pavel Machek ha scritto:

>Hi!
>
>  
>
>>>>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?
>>>      
>>>
>
>  
>
>>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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: 2.6.14-git4 suspend fails: kernel NULL pointer dereference
  2005-11-08 15:19       ` Patrizio
@ 2005-11-08 21:48         ` Pavel Machek
  2005-11-09 15:48           ` Patrizio Bassi
  0 siblings, 1 reply; 11+ messages in thread
From: Pavel Machek @ 2005-11-08 21:48 UTC (permalink / raw)
  To: Patrizio; +Cc: Shaohua Li, kernel list

Hi!

> >>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
-- 
Thanks, Sharp!

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: 2.6.14-git4 suspend fails: kernel NULL pointer dereference
  2005-11-08 21:48         ` Pavel Machek
@ 2005-11-09 15:48           ` Patrizio Bassi
  0 siblings, 0 replies; 11+ messages in thread
From: Patrizio Bassi @ 2005-11-09 15:48 UTC (permalink / raw)
  To: Pavel Machek; +Cc: Shaohua Li, kernel list

Pavel Machek ha scritto:

>Hi!
>
>  
>
>>>>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
>  
>
ok,

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

Patrizio

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2005-11-09 15:48 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20051006072749.GA2393@spitz.ucw.cz>
2005-11-07 16:47 ` 2.6.14-git4 suspend fails: kernel NULL pointer dereference Pavel Machek
2005-11-07 18:04   ` Patrizio Bassi
2005-11-07 18:07     ` Pavel Machek
2005-11-08  7:50       ` Patrizio Bassi
2005-11-08  1:02   ` Shaohua Li
2005-11-08  7:52     ` Patrizio Bassi
2005-11-08  9:12     ` Pavel Machek
2005-11-08 15:19       ` Patrizio
2005-11-08 21:48         ` Pavel Machek
2005-11-09 15:48           ` Patrizio Bassi
2005-11-03  9:09 Patrizio Bassi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).