Skip to content
Commit f6514be5 authored by Dan Carpenter's avatar Dan Carpenter Committed by Rafael J. Wysocki
Browse files

PM / hibernate: Fix memory corruption in resumedelay_setup()



In the original code "resume_delay" is an int so on 64 bits, the call to
kstrtoul() will cause memory corruption.  We may as well fix a style
issue here as well and make "resume_delay" unsigned int, since that's
what we pass to ssleep().

Fixes: 317cf7e5 (PM / hibernate: convert simple_strtoul to kstrtoul)
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Acked-by: default avatarPavel Machek <pavel@ucw.cz>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 317cf7e5
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment