Files
kernel_xiaomi_sm8250/kernel
Alexander Potapenko b8dc994624 UPSTREAM: PM: hibernate: fix crashes with init_on_free=1
Upon resuming from hibernation, free pages may contain stale data from
the kernel that initiated the resume. This breaks the invariant
inflicted by init_on_free=1 that freed pages must be zeroed.

To deal with this problem, make clear_free_pages() also clear the free
pages when init_on_free is enabled.

Fixes: 6471384af2a6 ("mm: security: introduce init_on_alloc=1 and init_on_free=1 boot options")
Reported-by: Johannes Stezenbach <js@sig21.net>
Signed-off-by: Alexander Potapenko <glider@google.com>
Cc: 5.3+ <stable@vger.kernel.org> # 5.3+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
(cherry picked from commit 18451f9f9e5810b8bd1245c5ae166f257e0e2b9d)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I32c22a60082bb3b49eae7de3c7d9d5ae2b965dc5
2020-11-16 09:22:34 +01:00
..
2019-12-13 08:51:11 +01:00
2019-12-01 09:17:17 +01:00
2020-04-29 19:16:15 +02:00
2020-06-22 10:50:54 +02:00
2020-06-22 10:50:54 +02:00
2020-11-10 13:23:09 +01:00
2020-01-15 14:51:23 +00:00
2019-12-01 09:53:43 +01:00
2020-03-25 08:06:13 +01:00
2019-08-12 13:36:37 -04:00
2020-10-01 16:49:05 +02:00
2020-01-09 10:18:59 +01:00
2019-03-06 15:59:21 +00:00