aboutsummaryrefslogtreecommitdiff
path: root/scripts/gcc-plugins/cyc_complexity_plugin.c
diff options
context:
space:
mode:
authorChen Yu <[email protected]>2016-11-28 14:35:19 -0800
committerThomas Gleixner <[email protected]>2016-11-29 18:02:58 +0100
commitba58d1020a54933c6b087a3107661c8513556cb8 (patch)
tree1bb61c0113f26bbbd4308a5040904bdf8fa3eebc /scripts/gcc-plugins/cyc_complexity_plugin.c
parenta109ded26c8c85c17872c8f61e8979c5d650004d (diff)
timekeeping: Ignore the bogus sleep time if pm_trace is enabled
Power management suspend/resume tracing (ab)uses the RTC to store suspend/resume information persistently. As a consequence the RTC value is clobbered when timekeeping is resumed and tries to inject the sleep time. Commit a4f8f6667f09 ("timekeeping: Cap array access in timekeeping_debug") plugged a out of bounds array access in the timekeeping debug code which was caused by the clobbered RTC value, but we still use the clobbered RTC value for sleep time injection into kernel timekeeping, which will result in random adjustments depending on the stored "hash" value. To prevent this keep track of the RTC clobbering and ignore the invalid RTC timestamp at resume. If the system resumed successfully clear the flag, which marks the RTC as unusable, warn the user about the RTC clobber and recommend to adjust the RTC with 'ntpdate' or 'rdate'. [jstultz: Fixed up pr_warn formating, and implemented suggestions from Ingo] [ tglx: Rewrote changelog ] Originally-from: Thomas Gleixner <[email protected]> Signed-off-by: Chen Yu <[email protected]> Signed-off-by: John Stultz <[email protected]> Acked-by: Pavel Machek <[email protected]> Acked-by: Thomas Gleixner <[email protected]> Cc: Prarit Bhargava <[email protected]> Cc: "Rafael J. Wysocki" <[email protected]> Cc: Richard Cochran <[email protected]> Cc: Xunlei Pang <[email protected]> Cc: Len Brown <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
Diffstat (limited to 'scripts/gcc-plugins/cyc_complexity_plugin.c')
0 files changed, 0 insertions, 0 deletions