public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Ingo Molnar <mingo@elte.hu>
Cc: kernel list <linux-kernel@vger.kernel.org>,
	Linux-pm mailing list <linux-pm@lists.osdl.org>
Subject: Re: sleepy linux self-test
Date: Thu, 31 Jan 2008 00:26:06 +0100	[thread overview]
Message-ID: <20080130232606.GB5937@elf.ucw.cz> (raw)
In-Reply-To: <20080130193626.GA15384@elte.hu>

Hi!

> > This version should work, at least it did not fail in my testing. It 
> > does one test 5 second after bootup, then periodically once per 500 
> > seconds. Different parameters are trivial to tweak.
> 
> the x86.git qa mix produced this spontaneous reboot failure:

Is it reproducible, or it just happened randomly once during shutdown?

Did it work on at least few machines?

> [   18.387888] Calling initcall 0xC0135EA8: test_sleep+0x0/0x1c()
> [   18.394189] Auto sleep: Now 1201724894
> [   18.395892] BUG: unable to handle kernel NULL pointer dereference at 00000160
> [   18.405792] IP: [<c0501b1b>] cmos_set_alarm+0xb/0x201
> [   18.411891] *pde = 00000000
>  [ spontaneous reboot ]
> 
> config attached. Do you need any more info than this? Should i try to 
> debug this?

Can you try this? I forgot that you can rmmod rtc-cmos, too...
diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c.

								Pavel

diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c
index 5bbdb70..15050cd 100644
--- a/drivers/rtc/rtc-cmos.c
+++ b/drivers/rtc/rtc-cmos.c
@@ -402,6 +402,8 @@ int set_alarm(int length)
 	unsigned long now, alarm;
 	struct rtc_wkalrm alm;
 
+	if (!pc_rtc_device)
+		return -EFAULT;
 	retval = cmos_read_time(pc_rtc_device, &alm.time);
 	if (retval < 0) {
 		printk("Auto sleep: can't get time?\n");
@@ -590,6 +592,7 @@ static void __exit cmos_do_remove(struct
 	struct cmos_rtc	*cmos = dev_get_drvdata(dev);
 	struct resource *ports;
 
+	pc_rtc_device = NULL;
 	cmos_do_shutdown();
 
 	if (is_valid_irq(cmos->irq))
diff --git a/kernel/power/sleepy.c b/kernel/power/sleepy.c
index b8b2de3..222d22d 100644
--- a/kernel/power/sleepy.c
+++ b/kernel/power/sleepy.c
@@ -31,7 +31,8 @@ int ksleepyd(void *data)
 {
 	msleep(5000);
 	while (1) {
-		set_alarm(5);
+		if (set_alarm(5))
+			return -EFAULT;
 		pm_suspend(PM_SUSPEND_MEM);
 		msleep(500000);
 	}

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

  reply	other threads:[~2008-01-30 23:26 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-30 13:17 sleepy linux self-test Pavel Machek
2008-01-30 16:35 ` Ingo Molnar
2008-01-30 16:39   ` Pavel Machek
2008-01-30 19:36 ` Ingo Molnar
2008-01-30 23:26   ` Pavel Machek [this message]
2008-02-01 14:22     ` Ingo Molnar
2008-02-02 12:45       ` Pavel Machek
2008-02-02 13:49         ` Ingo Molnar
2008-02-02 13:51         ` Ingo Molnar
2008-02-01  1:55 ` David Brownell
     [not found] ` <200801311755.33899.david-b@pacbell.net>
2008-02-02 12:47   ` Pavel Machek
     [not found]   ` <20080202124759.GB25773@elf.ucw.cz>
2008-02-02 13:50     ` Ingo Molnar
2008-02-02 17:31     ` David Brownell
     [not found]     ` <20080202135037.GC925@elte.hu>
2008-02-02 17:49       ` David Brownell
     [not found]       ` <200802020949.23397.david-b@pacbell.net>
2008-02-02 18:06         ` Ingo Molnar
     [not found]         ` <20080202180604.GC26560@elte.hu>
2008-02-02 19:47           ` David Brownell
     [not found]     ` <200802020931.38689.david-b@pacbell.net>
2008-02-02 17:51       ` David Brownell
2008-02-02 18:00       ` Ingo Molnar
     [not found]       ` <20080202180002.GB26560@elte.hu>
2008-02-02 19:13         ` David Brownell
     [not found]         ` <200802021113.22130.david-b@pacbell.net>
2008-02-02 19:32           ` Pavel Machek
     [not found]           ` <20080202193202.GB31621@elf.ucw.cz>
2008-02-02 19:38             ` Ingo Molnar
     [not found]             ` <20080202193843.GB32039@elte.hu>
2008-02-02 19:59               ` Pavel Machek
2008-02-03  2:37               ` David Brownell
     [not found]               ` <200802021837.17777.david-b@pacbell.net>
2008-02-03  5:05                 ` Ingo Molnar
     [not found]                 ` <20080203050537.GA18942@elte.hu>
2008-02-03  5:14                   ` Ingo Molnar
     [not found]                   ` <20080203051425.GA20740@elte.hu>
2008-02-03  5:19                     ` Ingo Molnar
     [not found]                     ` <20080203051953.GA21183@elte.hu>
2008-02-03  5:35                       ` Ingo Molnar
     [not found]                       ` <20080203053507.GA21681@elte.hu>
2008-02-03  5:54                         ` Ingo Molnar
     [not found]                         ` <20080203055429.GA24996@elte.hu>
2008-02-03  7:05                           ` Ingo Molnar
     [not found]                           ` <20080203070554.GA11780@elte.hu>
2008-02-03  7:32                             ` David Brownell
     [not found]                             ` <200802022332.58034.david-b@pacbell.net>
2008-02-03 12:21                               ` Rafael J. Wysocki
     [not found]                               ` <200802031321.27828.rjw@sisk.pl>
2008-02-03 13:16                                 ` David Brownell
     [not found]                                 ` <20080203131636.4100828D3E1@adsl-69-226-248-13.dsl.pltn13.pacbell.net>
2008-02-03 21:29                                   ` Rafael J. Wysocki
     [not found]                                   ` <200802032229.30576.rjw@sisk.pl>
2008-02-03 22:42                                     ` David Brownell
     [not found]                                     ` <20080203224206.8FD40166811@adsl-69-226-248-13.dsl.pltn13.pacbell.net>
2008-02-03 22:43                                       ` Rafael J. Wysocki
2008-02-03 22:48                                       ` Pavel Machek
     [not found]                                       ` <20080203224831.GE2799@elf.ucw.cz>
2008-02-03 23:08                                         ` David Brownell
     [not found]                                         ` <20080203230826.C05AF9E4D0@adsl-69-226-248-13.dsl.pltn13.pacbell.net>
2008-02-10 21:03                                           ` Pavel Machek
2008-02-18  8:56                                   ` Pavel Machek
     [not found]                                   ` <20080218085655.GA6419@elf.ucw.cz>
2008-02-18  9:46                                     ` [patch] suspend/resume self-test Ingo Molnar
     [not found]                                     ` <20080218094650.GA31970@elte.hu>
2008-02-18  9:53                                       ` Pavel Machek
     [not found]                                       ` <20080218095325.GA7198@elf.ucw.cz>
2008-02-18 10:40                                         ` David Brownell
     [not found]                                         ` <200802180240.47510.david-b@pacbell.net>
2008-02-18 11:04                                           ` Rafael J. Wysocki
2008-02-18 13:09                                           ` Ingo Molnar
     [not found]                                           ` <20080218130914.GC17697@elte.hu>
2008-02-18 20:16                                             ` David Brownell
     [not found]                                             ` <200802181216.25350.david-b@pacbell.net>
2008-02-19 10:11                                               ` Pavel Machek
2008-02-19 14:43                                                 ` Ingo Molnar
     [not found]                                                 ` <20080219144328.GD21176@elte.hu>
2008-02-19 19:12                                                   ` David Brownell
     [not found]                                                   ` <200802191112.57616.david-b@pacbell.net>
2008-02-20 10:15                                                     ` Ingo Molnar
2008-02-19 14:40                                               ` Ingo Molnar
2008-02-18 11:06                                       ` Rafael J. Wysocki
2008-02-10 21:02                           ` sleepy linux self-test Pavel Machek
2008-02-03  7:18                     ` David Brownell
     [not found]                     ` <200802022318.03597.david-b@pacbell.net>
2008-02-03  7:51                       ` Sam Ravnborg
     [not found]                       ` <20080203075111.GB19981@uranus.ravnborg.org>
2008-02-03  8:26                         ` David Brownell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080130232606.GB5937@elf.ucw.cz \
    --to=pavel@ucw.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@lists.osdl.org \
    --cc=mingo@elte.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox