]> Gentwo Git Trees - linux/.git/commit
PM: hibernate: Emit an error when image writing fails
authorMario Limonciello (AMD) <superm1@kernel.org>
Thu, 6 Nov 2025 04:51:05 +0000 (22:51 -0600)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 7 Nov 2025 15:53:56 +0000 (16:53 +0100)
commit62b9ca1706e1bbb60d945a58de7c7b5826f6b2a2
tree0d488c065249af3b263df140a645850038fbfb46
parent6146a0f1dfae5d37442a9ddcba012add260bceb0
PM: hibernate: Emit an error when image writing fails

If image writing fails, a return code is passed up to the caller, but
none of the callers log anything to the log and so the only record
of it is the return code that userspace gets.

Adjust the logging so that the image size and speed of writing is
only emitted on success and if there is an error, it's saved to the
logs.

Fixes: a06c6f5d3cc9 ("PM: hibernate: Move to crypto APIs for LZO compression")
Reported-by: Askar Safin <safinaskar@gmail.com>
Closes: https://lore.kernel.org/linux-pm/20251105180506.137448-1-safinaskar@gmail.com/
Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org>
Tested-by: Askar Safin <safinaskar@gmail.com>
Cc: 6.9+ <stable@vger.kernel.org> # 6.9+
[ rjw: Added missing braces after "else", changelog edits ]
Link: https://patch.msgid.link/20251106045158.3198061-2-superm1@kernel.org
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
kernel/power/swap.c