summaryrefslogtreecommitdiffstats
path: root/kernel/user_namespace.c
diff options
context:
space:
mode:
authorJohn Stultz2015-03-12 05:16:34 +0100
committerIngo Molnar2015-03-13 08:07:05 +0100
commit057b87e3161d1194a095718f9918c01b2c389e74 (patch)
tree8f6b79b5f9d6c12b8a53148e04961081eb9f3243 /kernel/user_namespace.c
parenttimekeeping: Add checks to cap clocksource reads to the 'max_cycles' value (diff)
downloadkernel-qcow2-linux-057b87e3161d1194a095718f9918c01b2c389e74.tar.gz
kernel-qcow2-linux-057b87e3161d1194a095718f9918c01b2c389e74.tar.xz
kernel-qcow2-linux-057b87e3161d1194a095718f9918c01b2c389e74.zip
timekeeping: Try to catch clocksource delta underflows
In the case where there is a broken clocksource where there are multiple actual clocks that aren't perfectly aligned, we may see small "negative" deltas when we subtract 'now' from 'cycle_last'. The values are actually negative with respect to the clocksource mask value, not necessarily negative if cast to a s64, but we can check by checking the delta to see if it is a small (relative to the mask) negative value (again negative relative to the mask). If so, we assume we jumped backwards somehow and instead use zero for our delta. Signed-off-by: John Stultz <john.stultz@linaro.org> Cc: Dave Jones <davej@codemonkey.org.uk> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Prarit Bhargava <prarit@redhat.com> Cc: Richard Cochran <richardcochran@gmail.com> Cc: Stephen Boyd <sboyd@codeaurora.org> Cc: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/1426133800-29329-7-git-send-email-john.stultz@linaro.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/user_namespace.c')
0 files changed, 0 insertions, 0 deletions