PM: hibernate: Use __get_safe_page() rather than touching the list
authorBrian Geffon <bgeffon@google.com>
Thu, 21 Sep 2023 17:00:45 +0000 (13:00 -0400)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 21 Sep 2023 18:25:49 +0000 (20:25 +0200)
commitf0c7183008b41e92fa676406d87f18773724b48b
treeb6f7ad5585cb9dd88589476de3712871cbb935cf
parentce9ecca0238b140b88f43859b211c9fdfd8e5b70
PM: hibernate: Use __get_safe_page() rather than touching the list

We found at least one situation where the safe pages list was empty and
get_buffer() would gladly try to use a NULL pointer.

Signed-off-by: Brian Geffon <bgeffon@google.com>
Fixes: 8357376d3df2 ("[PATCH] swsusp: Improve handling of highmem")
Cc: All applicable <stable@vger.kernel.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
kernel/power/snapshot.c