Commit 82714078 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
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
parents fc5b94f1 b21f18ef
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -2647,7 +2647,7 @@ static int prepare_image(struct memory_bitmap *new_bm, struct memory_bitmap *bm,
	memory_bm_free(bm, PG_UNSAFE_KEEP);

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

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

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

	if (nr_highmem > 0) {