• Rafael J. Wysocki's avatar
    PM / Hibernate: Fix preallocating of memory · a9c9b442
    Rafael J. Wysocki authored
    The hibernate memory preallocation code allocates memory to push some
    user space data out of physical RAM, so that the hibernation image is
    not too large.  It allocates more memory than necessary for creating
    the image, so it has to release some pages to make room for
    allocations made while suspending devices and disabling nonboot CPUs,
    or the system will hang due to the lack of free pages to allocate
    from.  Unfortunately, the function used for freeing these pages,
    free_unnecessary_pages(), contains a bug that prevents it from doing
    the job on all systems without highmem.
    
    Fix this problem, which is a regression from the 2.6.30 kernel, by
    using the right condition for the termination of the loop in
    free_unnecessary_pages().
    Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
    Reported-and-tested-by: default avatarAlan Jenkins <sourcejedi.lkml@googlemail.com>
    Cc: stable@kernel.org
    a9c9b442
Name
Last commit
Last update
..
Kconfig Loading commit data...
Makefile Loading commit data...
console.c Loading commit data...
hibernate.c Loading commit data...
hibernate_nvs.c Loading commit data...
main.c Loading commit data...
power.h Loading commit data...
poweroff.c Loading commit data...
process.c Loading commit data...
snapshot.c Loading commit data...
suspend.c Loading commit data...
suspend_test.c Loading commit data...
swap.c Loading commit data...
user.c Loading commit data...