mirror of
https://github.com/torvalds/linux.git
synced 2026-11-26 00:12:52 +00:00
There are quite a few GFP_KERNEL memory allocations made during suspend/hibernation and resume that may cause the system to hang, because the I/O operations they depend on cannot be completed due to the underlying devices being suspended. Avoid this problem by clearing the __GFP_IO and __GFP_FS bits in gfp_allowed_mask before suspend/hibernation and restoring the original values of these bits in gfp_allowed_mask durig the subsequent resume. [[email protected]: fix CONFIG_PM=n linkage] Signed-off-by: Rafael J. Wysocki <[email protected]> Reported-by: Maxim Levitsky <[email protected]> Cc: Sebastian Ott <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Cc: KOSAKI Motohiro <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>