The patch titled
swsusp: fix error handling
has been added to the -mm tree. Its filename is
swsusp-fix-error-handling.patch
Patches currently in -mm which might be from [EMAIL PROTECTED] are
ipw2100-assume-recent-kernel.patch
ipw2100-kill-dead-macros.patch
ipw2100-small-cleanups.patch
ipw2100-cleanup-debug-prints.patch
ipw2100-remove-by-hand-function-entry-exit-debugging.patch
ipw2100-remove-commented-out-code.patch
pm-more-u32-vs-pm_message_t-fixes.patch
call-device_shutdown-with-interrupts-enabled.patch
fix-resume-from-initrd.patch
swsusp-fix-error-handling.patch
clean-up-processc.patch
video-documentation-update.patch
From: Pavel Machek <[EMAIL PROTECTED]>
Fix error handling and whitespace in swsusp.c. swsusp_free() was called when
there was nothing allocating, leading to oops.
Signed-off-by: Pavel Machek <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
---
kernel/power/swsusp.c | 23 +++++++++++------------
1 files changed, 11 insertions(+), 12 deletions(-)
diff -puN kernel/power/swsusp.c~swsusp-fix-error-handling kernel/power/swsusp.c
--- 25/kernel/power/swsusp.c~swsusp-fix-error-handling Wed Jul 6 13:03:43 2005
+++ 25-akpm/kernel/power/swsusp.c Wed Jul 6 13:03:43 2005
@@ -869,13 +869,6 @@ extern asmlinkage int swsusp_arch_resume
asmlinkage int swsusp_save(void)
{
- int error = 0;
-
- if ((error = swsusp_swap_check())) {
- printk(KERN_ERR "swsusp: FATAL: cannot find swap device, try "
- "swapon -a!\n");
- return error;
- }
return suspend_prepare_image();
}
@@ -892,14 +885,20 @@ int swsusp_suspend(void)
* at resume time, and evil weirdness ensues.
*/
if ((error = device_power_down(PMSG_FREEZE))) {
- printk(KERN_ERR "Some devices failed to power down, aborting
suspend\n");
local_irq_enable();
- swsusp_free();
return error;
}
+
+ if ((error = swsusp_swap_check())) {
+ printk(KERN_ERR "swsusp: FATAL: cannot find swap device, try "
+ "swapon -a!\n");
+ local_irq_enable();
+ return error;
+ }
+
save_processor_state();
if ((error = swsusp_arch_suspend()))
- swsusp_free();
+ printk("Error %d suspending\n", error);
/* Restore control flow magically appears here */
restore_processor_state();
BUG_ON (nr_copy_pages_check != nr_copy_pages);
@@ -1166,9 +1165,9 @@ static int bio_write_page(pgoff_t page_o
static const char * sanity_check(void)
{
dump_info();
- if(swsusp_info.version_code != LINUX_VERSION_CODE)
+ if (swsusp_info.version_code != LINUX_VERSION_CODE)
return "kernel version";
- if(swsusp_info.num_physpages != num_physpages)
+ if (swsusp_info.num_physpages != num_physpages)
return "memory size";
if (strcmp(swsusp_info.uts.sysname,system_utsname.sysname))
return "system type";
_
-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html