Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
timekeeping: Avoid taking lock in NMI path with CONFIG_DEBUG_TIMEKEEPING
When I added some extra sanity checking in timekeeping_get_ns() under CONFIG_DEBUG_TIMEKEEPING, I missed that the NMI safe __ktime_get_fast_ns() method was using timekeeping_get_ns(). Thus the locking added to the debug checks broke the NMI-safety of __ktime_get_fast_ns(). This patch open-codes the timekeeping_get_ns() logic for __ktime_get_fast_ns(), so can avoid any deadlocks in NMI. Fixes: 4ca22c2 "timekeeping: Add warnings when overflows or underflows are observed" Reported-by: Steven Rostedt <[email protected]> Reported-by: Peter Zijlstra <[email protected]> Signed-off-by: John Stultz <[email protected]> Cc: stable <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
- Loading branch information