• John Stultz's avatar
    timekeeping: Fix missing timekeeping_update in suspend path · 226e0f71
    John Stultz authored
    commit 330a1617 upstream.
    
    Since 48cdc135 (Implement a shadow timekeeper), we have to
    call timekeeping_update() after any adjustment to the timekeeping
    structure in order to make sure that any adjustments to the structure
    persist.
    
    In the timekeeping suspend path, we udpate the timekeeper
    structure, so we should be sure to update the shadow-timekeeper
    before releasing the timekeeping locks. Currently this isn't done.
    
    In most cases, the next time related code to run would be
    timekeeping_resume, which does update the shadow-timekeeper, but
    in an abundence of caution, this patch adds the call to
    timekeeping_update() in the suspend path.
    
    Cc: Sasha Levin <sasha.levin@oracle.com>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: Prarit Bhargava <prarit@redhat.com>
    Cc: Richard Cochran <richardcochran@gmail.com>
    Cc: Ingo Molnar <mingo@kernel.org>
    Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    226e0f71
timekeeping.c 44.6 KB