Public bug reported:

Ubuntu-2.6.35-25, Maverick.

After repeated S4 cycles, a memcpy() Oops occurs in suspend_nvs_save.
This error occurs because the ioremap of the NVS region fails, returning
NULL and the subsequent memcpy() tries to copy to a NULL pointer, hence
the oops.

We are running out of mappable regions because suspend_nvs_save() is
called twice during hibernation, and yet the unmapping via
suspend_nvs_free() is only called once, hence we have a leak.

Looking at create_image() in kernel/power/hibernate.c, we can see that
we call the __acpi_pm_prepare() via arch_prepare_suspend() and a little
later we call platform_pre_snapshot() which calls
acpi_hibernation_pre_snapshot() which does the duplication of the
suspend_nvs_save().   We need to drop one of these.

This has been fixed in upstream commit:

commit c5f7a1bb65bca03253c189e946b3ca79669f08af
Author: Rafael J. Wysocki <r...@sisk.pl>
Date:   Fri Jul 2 00:14:09 2010 +0200

    ACPI / Sleep: Consolidate suspend and hibernation routines

    Some hibernation and suspend routines can be merged, which reduces
    the complexity of code a bit.

    Signed-off-by: Rafael J. Wysocki <r...@sisk.pl>
    Signed-off-by: Len Brown <len.br...@intel.com>

..where the extraneous suspend_nvs_save() has been dropped from function
__acpi_pm_prepare()

** Affects: linux (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/703228

Title:
  memcpy Oops in suspend_nvs_save after multiple S4 cycles

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to