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: NDan Carpenter <dan.carpenter@oracle.com> Acked-by: NPavel Machek <pavel@ucw.cz> Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
Showing
想要评论请 注册 或 登录