mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@suse.cz>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: 2.6.9-rc3[+recent swsusp patches]: swsusp kernel-preemption-unfriendly?
Date: Tue, 5 Oct 2004 23:27:58 +0200	[thread overview]
Message-ID: <20041005212757.GB5763@elf.ucw.cz> (raw)
In-Reply-To: <200410052314.25253.rjw@sisk.pl>

Hi!

> It looks like there's a probel with the kernel preemption vs swsusp:

It is not in kernel preemption, see that NULL pointer dereference? Try
this one...

								Pavel

--- clean-suse/kernel/power/swsusp.c	2004-10-05 11:36:23.000000000 +0200
+++ linux-suse/kernel/power/swsusp.c	2004-10-05 22:35:21.000000000 +0200
@@ -568,6 +568,7 @@
 	struct zone *zone;
 	unsigned long zone_pfn;
 	struct pbe * pbe = pagedir_nosave;
+	int pages_copied = 0;
 	
 	for_each_zone(zone) {
 		if (is_highmem(zone))
@@ -576,13 +577,17 @@
 			if (saveable(zone, &zone_pfn)) {
 				struct page * page;
 				page = pfn_to_page(zone_pfn + zone->zone_start_pfn);
+
 				pbe->orig_address = (long) page_address(page);
 				/* copy_page is no usable for copying task structs. */
 				memcpy((void *)pbe->address, (void *)pbe->orig_address, PAGE_SIZE);
 				pbe++;
+				pages_copied++;
 			}
 		}
 	}
+	BUG_ON(pages_copied > nr_copy_pages);
+	nr_copy_pages = pages_copied;
 }
 
 
@@ -863,7 +868,7 @@
 
 asmlinkage int swsusp_restore(void)
 {
-	BUG_ON (nr_copy_pages_check != nr_copy_pages);
+//	BUG_ON (nr_copy_pages_check != nr_copy_pages);
 	BUG_ON (pagedir_order_check != pagedir_order);
 	
 	/* Even mappings of "global" things (vmalloc) need to be fixed */
-- 
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!

  reply	other threads:[~2004-10-05 21:28 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-05 21:14 Rafael J. Wysocki
2004-10-05 21:27 ` Pavel Machek [this message]
2004-10-06  8:55   ` Rafael J. Wysocki
2004-10-06  8:54     ` Pavel Machek
2004-10-06 10:06       ` Rafael J. Wysocki
2004-10-06 10:12         ` Pavel Machek
2004-10-06 21:46           ` Rafael J. Wysocki
2004-10-06 22:06             ` Fix random crashes in x86-64 swsusp Pavel Machek
2004-10-06 22:13               ` [kernel] " Andi Kleen
2004-10-06 22:25               ` Andrew Morton
2004-10-06 22:24                 ` Pavel Machek
2004-10-08 20:59               ` swsusp: 8-order memory allocations problem (was: Re: Fix random crashes in x86-64 swsusp) Rafael J. Wysocki
2004-10-10 13:48                 ` Pavel Machek
2004-10-10 18:28                   ` Andrew Morton
2004-10-13 17:24                   ` Rafael J. Wysocki
2004-10-14 15:37                     ` swsusp: 8-order memory allocations problem (update) Rafael J. Wysocki

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=20041005212757.GB5763@elf.ucw.cz \
    --to=pavel@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rjw@sisk.pl \
    /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

all inboxes | Powered by JetHome®