PM / hibernate: Check the success of generating md5 digest before hibernation
authorChen Yu <yu.c.chen@intel.com>
Fri, 21 Sep 2018 06:26:38 +0000 (14:26 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 24 Nov 2019 07:19:56 +0000 (08:19 +0100)
commit9372023e10ee3f46f82acb1695c8de32ee59262a
treeb71890a53ca7ceb8ee174c1401a277f7ffcc52ce
parented896ddfae942b6a87bf3a273f88a11d8f85317d
PM / hibernate: Check the success of generating md5 digest before hibernation

[ Upstream commit 749fa17093ff67b31dea864531a3698b6a95c26c ]

Currently if get_e820_md5() fails, then it will hibernate nevertheless.
Actually the error code should be propagated to upper caller so that
the hibernation could be aware of the result and terminates the process
if md5 digest fails.

Suggested-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Chen Yu <yu.c.chen@intel.com>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/x86/power/hibernate_64.c