Skip to content

Commit 8271407

Browse files
committed
Merge tag 'pm-6.6-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull power management fix from Rafael Wysocki: "Fix a recently introduced hibernation crash (Pavankumar Kondeti)" * tag 'pm-6.6-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: PM: hibernate: Fix copying the zero bitmap to safe pages
2 parents fc5b94f + b21f18e commit 8271407

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

kernel/power/snapshot.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2647,7 +2647,7 @@ static int prepare_image(struct memory_bitmap *new_bm, struct memory_bitmap *bm,
26472647
memory_bm_free(bm, PG_UNSAFE_KEEP);
26482648

26492649
/* Make a copy of zero_bm so it can be created in safe pages */
2650-
error = memory_bm_create(&tmp, GFP_ATOMIC, PG_ANY);
2650+
error = memory_bm_create(&tmp, GFP_ATOMIC, PG_SAFE);
26512651
if (error)
26522652
goto Free;
26532653

@@ -2660,7 +2660,7 @@ static int prepare_image(struct memory_bitmap *new_bm, struct memory_bitmap *bm,
26602660
goto Free;
26612661

26622662
duplicate_memory_bitmap(zero_bm, &tmp);
2663-
memory_bm_free(&tmp, PG_UNSAFE_KEEP);
2663+
memory_bm_free(&tmp, PG_UNSAFE_CLEAR);
26642664
/* At this point zero_bm is in safe pages and it can be used for restoring. */
26652665

26662666
if (nr_highmem > 0) {

0 commit comments

Comments
 (0)