]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
PM: hibernate: fix __setup handler error handling
authorRandy Dunlap <rdunlap@infradead.org>
Mon, 28 Feb 2022 22:05:32 +0000 (14:05 -0800)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 20 May 2022 12:37:59 +0000 (14:37 +0200)
commit94df031794a1d3d8e49ff36aabc8f32039f759bd
tree331554bd1d34832d36e0f3d520200ffc72e3bd43
parent80099b9491db9cb900c126c29f194b9f5536339e
PM: hibernate: fix __setup handler error handling

BugLink: https://bugs.launchpad.net/bugs/1969110
[ Upstream commit ba7ffcd4c4da374b0f64666354eeeda7d3827131 ]

If an invalid value is used in "resumedelay=<seconds>", it is
silently ignored. Add a warning message and then let the __setup
handler return 1 to indicate that the kernel command line option
has been handled.

Fixes: 317cf7e5e85e3 ("PM / hibernate: convert simple_strtoul to kstrtoul")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Reported-by: Igor Zhbanov <i.zhbanov@omprussia.ru>
Link: lore.kernel.org/r/64644a2f-4a20-bab3-1e15-3b2cdd0defe3@omprussia.ru
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit d0cd9da501f65545c02cb7a220061e52c9e4b222)
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
kernel/power/hibernate.c