* [PATCH][Fix] swsusp: do not trigger BUG_ON() if there is not enough memory
@ 2005-09-22 20:54 Rafael J. Wysocki
2005-09-22 21:12 ` Pavel Machek
0 siblings, 1 reply; 2+ messages in thread
From: Rafael J. Wysocki @ 2005-09-22 20:54 UTC (permalink / raw)
To: Pavel Machek; +Cc: LKML, Andrew Morton
Hi,
The following patch makes swsusp avoid triggering the BUG_ON() in swsusp_suspend()
if there is not enough memory for suspend. Please apply.
Greetings,
Rafael
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Index: linux-2.6.14-rc2/kernel/power/swsusp.c
===================================================================
--- linux-2.6.14-rc2.orig/kernel/power/swsusp.c 2005-09-22 22:22:39.000000000 +0200
+++ linux-2.6.14-rc2/kernel/power/swsusp.c 2005-09-22 22:23:10.000000000 +0200
@@ -918,6 +918,7 @@
pagedir_nosave = NULL;
nr_copy_pages = calc_nr(nr_copy_pages);
+ nr_copy_pages_check = nr_copy_pages;
pr_debug("suspend: (pages needed: %d + %d free: %d)\n",
nr_copy_pages, PAGES_FOR_IO, nr_free_pages());
@@ -940,7 +941,6 @@
return error;
}
- nr_copy_pages_check = nr_copy_pages;
return 0;
}
--
- Would you tell me, please, which way I ought to go from here?
- That depends a good deal on where you want to get to.
-- Lewis Carroll "Alice's Adventures in Wonderland"
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH][Fix] swsusp: do not trigger BUG_ON() if there is not enough memory
2005-09-22 20:54 [PATCH][Fix] swsusp: do not trigger BUG_ON() if there is not enough memory Rafael J. Wysocki
@ 2005-09-22 21:12 ` Pavel Machek
0 siblings, 0 replies; 2+ messages in thread
From: Pavel Machek @ 2005-09-22 21:12 UTC (permalink / raw)
To: Rafael J. Wysocki; +Cc: LKML, Andrew Morton
Hi!
> The following patch makes swsusp avoid triggering the BUG_ON() in swsusp_suspend()
> if there is not enough memory for suspend. Please apply.
Patch is okay. I had fix for same problem, but it was uglyer.
Pavel
--
if you have sharp zaurus hardware you don't need... you know my address
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-09-22 21:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-09-22 20:54 [PATCH][Fix] swsusp: do not trigger BUG_ON() if there is not enough memory Rafael J. Wysocki
2005-09-22 21:12 ` Pavel Machek
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).