aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/power
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-11-18 19:07:08 -0500
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-11-18 19:07:08 -0500
commitb38f67c4ae35eb4bcea0bf42a0a18a778a5d04c2 (patch)
tree16718edcebee40195a12dc01c7037b17c8f619f0 /kernel/power
parent9bad5845485ec22b31d4489c3bd6d96d78442437 (diff)
parent6a0c7cd33075f6b7f1d80145bb19812beb3fc5c9 (diff)
Merge branch 'pm-sleep'
* pm-sleep: PM / Hibernate: Do not crash kernel in free_basic_memory_bitmaps()
Diffstat (limited to 'kernel/power')
-rw-r--r--kernel/power/snapshot.c3
-rw-r--r--kernel/power/user.c1
2 files changed, 3 insertions, 1 deletions
diff --git a/kernel/power/snapshot.c b/kernel/power/snapshot.c
index 10c22cae83a0..b38109e204af 100644
--- a/kernel/power/snapshot.c
+++ b/kernel/power/snapshot.c
@@ -792,7 +792,8 @@ void free_basic_memory_bitmaps(void)
792{ 792{
793 struct memory_bitmap *bm1, *bm2; 793 struct memory_bitmap *bm1, *bm2;
794 794
795 BUG_ON(!(forbidden_pages_map && free_pages_map)); 795 if (WARN_ON(!(forbidden_pages_map && free_pages_map)))
796 return;
796 797
797 bm1 = forbidden_pages_map; 798 bm1 = forbidden_pages_map;
798 bm2 = free_pages_map; 799 bm2 = free_pages_map;
diff --git a/kernel/power/user.c b/kernel/power/user.c
index 24850270c802..98d357584cd6 100644
--- a/kernel/power/user.c
+++ b/kernel/power/user.c
@@ -70,6 +70,7 @@ static int snapshot_open(struct inode *inode, struct file *filp)
70 data->swap = swsusp_resume_device ? 70 data->swap = swsusp_resume_device ?
71 swap_type_of(swsusp_resume_device, 0, NULL) : -1; 71 swap_type_of(swsusp_resume_device, 0, NULL) : -1;
72 data->mode = O_RDONLY; 72 data->mode = O_RDONLY;
73 data->free_bitmaps = false;
73 error = pm_notifier_call_chain(PM_HIBERNATION_PREPARE); 74 error = pm_notifier_call_chain(PM_HIBERNATION_PREPARE);
74 if (error) 75 if (error)
75 pm_notifier_call_chain(PM_POST_HIBERNATION); 76 pm_notifier_call_chain(PM_POST_HIBERNATION);