memcpy Oops in suspend_nvs_save after multiple S4 cycles
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Fix Released
|
Medium
|
Colin Ian King | ||
Maverick |
Fix Released
|
Medium
|
Colin Ian King |
Bug Description
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/
This has been fixed in upstream commit:
commit c5f7a1bb65bca03
Author: Rafael J. Wysocki <email address hidden>
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 <email address hidden>
Signed-off-by: Len Brown <email address hidden>
..where the extraneous suspend_nvs_save() has been dropped from function __acpi_pm_prepare()
Changed in linux (Ubuntu Maverick): | |
status: | In Progress → Fix Committed |
tags: | added: hwe-blocker |
tags: |
added: verification-done-maverick removed: verification-done |
Note: Without this patch, one particular laptop is failing after 12 S4 iterations. With the patch we don't get the memcpy() oops anymore.
I've also soak tested this patch on another machine with 250 S4 cycles. I also threw in 250 S3 cycles to make sure we don't get any regressions.