diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-09-30 19:40:56 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-09-30 19:40:56 +0200 |
commit | aab1728915420b5288cd0fc7b5bd320105b48983 (patch) | |
tree | a722abc53c9cdf2711a46013c67cee76e042afae /kernel/power/snapshot.c | |
parent | 15c03dd4859ab16f9212238f29dd315654aa94f6 (diff) | |
download | op-kernel-dev-aab1728915420b5288cd0fc7b5bd320105b48983.zip op-kernel-dev-aab1728915420b5288cd0fc7b5bd320105b48983.tar.gz |
PM / hibernate: Fix user space driven resume regression
Recent commit 8fd37a4 (PM / hibernate: Create memory bitmaps after
freezing user space) broke the resume part of the user space driven
hibernation (s2disk), because I forgot that the resume utility
loaded the image into memory without freezing user space (it still
freezes tasks after loading the image). This means that during user
space driven resume we need to create the memory bitmaps at the
"device open" time rather than at the "freeze tasks" time, so make
that happen (that's a special case anyway, so it needs to be treated
in a special way).
Reported-and-tested-by: Ronald <ronald645@gmail.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'kernel/power/snapshot.c')
-rw-r--r-- | kernel/power/snapshot.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/kernel/power/snapshot.c b/kernel/power/snapshot.c index 358a146..98c3b34 100644 --- a/kernel/power/snapshot.c +++ b/kernel/power/snapshot.c @@ -743,7 +743,10 @@ int create_basic_memory_bitmaps(void) struct memory_bitmap *bm1, *bm2; int error = 0; - BUG_ON(forbidden_pages_map || free_pages_map); + if (forbidden_pages_map && free_pages_map) + return 0; + else + BUG_ON(forbidden_pages_map || free_pages_map); bm1 = kzalloc(sizeof(struct memory_bitmap), GFP_KERNEL); if (!bm1) |