Skip to content

Commit

Permalink
Merge branch 'pm-sleep'
Browse files Browse the repository at this point in the history
* pm-sleep:
  PM / Hibernate: Do not crash kernel in free_basic_memory_bitmaps()
  • Loading branch information
Rafael J. Wysocki committed Nov 19, 2013
2 parents 9bad584 + 6a0c7cd commit b38f67c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kernel/power/snapshot.c
Original file line number Diff line number Diff line change
Expand Up @@ -792,7 +792,8 @@ void free_basic_memory_bitmaps(void)
{
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;
bm2 = free_pages_map;
Expand Down
1 change: 1 addition & 0 deletions kernel/power/user.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ static int snapshot_open(struct inode *inode, struct file *filp)
data->swap = swsusp_resume_device ?
swap_type_of(swsusp_resume_device, 0, NULL) : -1;
data->mode = O_RDONLY;
data->free_bitmaps = false;
error = pm_notifier_call_chain(PM_HIBERNATION_PREPARE);
if (error)
pm_notifier_call_chain(PM_POST_HIBERNATION);
Expand Down

0 comments on commit b38f67c

Please sign in to comment.