Commit b38f67c4 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki

Merge branch 'pm-sleep'

* pm-sleep:
  PM / Hibernate: Do not crash kernel in free_basic_memory_bitmaps()
parents 9bad5845 6a0c7cd3
...@@ -792,7 +792,8 @@ void free_basic_memory_bitmaps(void) ...@@ -792,7 +792,8 @@ void free_basic_memory_bitmaps(void)
{ {
struct memory_bitmap *bm1, *bm2; struct memory_bitmap *bm1, *bm2;
BUG_ON(!(forbidden_pages_map && free_pages_map)); if (WARN_ON(!(forbidden_pages_map && free_pages_map)))
return;
bm1 = forbidden_pages_map; bm1 = forbidden_pages_map;
bm2 = free_pages_map; bm2 = free_pages_map;
......
...@@ -70,6 +70,7 @@ static int snapshot_open(struct inode *inode, struct file *filp) ...@@ -70,6 +70,7 @@ static int snapshot_open(struct inode *inode, struct file *filp)
data->swap = swsusp_resume_device ? data->swap = swsusp_resume_device ?
swap_type_of(swsusp_resume_device, 0, NULL) : -1; swap_type_of(swsusp_resume_device, 0, NULL) : -1;
data->mode = O_RDONLY; data->mode = O_RDONLY;
data->free_bitmaps = false;
error = pm_notifier_call_chain(PM_HIBERNATION_PREPARE); error = pm_notifier_call_chain(PM_HIBERNATION_PREPARE);
if (error) if (error)
pm_notifier_call_chain(PM_POST_HIBERNATION); pm_notifier_call_chain(PM_POST_HIBERNATION);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment