mirror of
https://github.com/torvalds/linux.git
synced 2026-09-25 21:21:09 -04:00
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: 6471384af2 ("mm: security: introduce init_on_alloc=1 and init_on_free=1 boot options")
Reported-by: Johannes Stezenbach <[email protected]>
Signed-off-by: Alexander Potapenko <[email protected]>
Cc: 5.3+ <[email protected]> # 5.3+
Signed-off-by: Rafael J. Wysocki <[email protected]>