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
Unified · Split
| @@ -2647,7 +2647,7 @@ static int prepare_image(struct memory_bitmap *new_bm, struct memory_bitmap *bm, · 2646 unmodified lines | ||
| 2647 | 2647 | memory_bm_free(bm, PG_UNSAFE_KEEP); |
| 2648 | 2648 | |
| 2649 | 2649 | /* 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); | |
| 2651 | 2651 | if (error) |
| 2652 | 2652 | goto Free; |
| 2653 | 2653 | |
| @@ -2660,7 +2660,7 @@ static int prepare_image(struct memory_bitmap *new_bm, struct memory_bitmap *bm, · 6 unmodified lines | ||
| 2660 | 2660 | goto Free; |
| 2661 | 2661 | |
| 2662 | 2662 | duplicate_memory_bitmap(zero_bm, &tmp); |
| 2663 | − memory_bm_free(&tmp, PG_UNSAFE_KEEP); | |
| 2663 | + memory_bm_free(&tmp, PG_UNSAFE_CLEAR); | |
| 2664 | 2664 | /* At this point zero_bm is in safe pages and it can be used for restoring. */ |
| 2665 | 2665 | |
| 2666 | 2666 | if (nr_highmem > 0) { |