• Anna-Maria Gleixner's avatar
    hrtimer: Ensure POSIX compliance (relative CLOCK_REALTIME hrtimers) · ac1cd8d4
    Anna-Maria Gleixner authored
    commit 48d0c9be
    
     upstream.
    
    The POSIX specification defines that relative CLOCK_REALTIME timers are not
    affected by clock modifications. Those timers have to use CLOCK_MONOTONIC
    to ensure POSIX compliance.
    
    The introduction of the additional HRTIMER_MODE_PINNED mode broke this
    requirement for pinned timers.
    
    There is no user space visible impact because user space timers are not
    using pinned mode, but for consistency reasons this needs to be fixed.
    
    Check whether the mode has the HRTIMER_MODE_REL bit set instead of
    comparing with HRTIMER_MODE_ABS.
    Signed-off-by: default avatarAnna-Maria Gleixner <anna-maria@linutronix.de>
    Cc: Christoph Hellwig <hch@lst.de>
    Cc: John Stultz <john.stultz@linaro.org>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: keescook@chromium.org
    Fixes: 597d0275 ("timers: Framework for identifying pinned timer...
    ac1cd8d4
hrtimer.c 48.5 KB