Commit:     90675a27fa3eb0e97f1d040b183cceb44316e669
Parent:     7a434814c7a6500b08bf4419ba8712b152d08d08
Author:     Daniel Walker <[EMAIL PROTECTED]>
AuthorDate: Tue Mar 6 01:42:11 2007 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Tue Mar 6 09:30:25 2007 -0800

    [PATCH] fix vsyscall settimeofday
    I've only seen this on x86_64.
    The vsyscall state only gets updated when a timer interrupts comes in.  So
    if the time is set long before the next timer, there will be a period when
    a gettimeofday() won't reflect the correct time.
    I added an explicit update_vsyscall() during the settimeofday(), that way
    the vsyscall state doesn't get stale.
    Signed-off-by: Daniel Walker <[EMAIL PROTECTED]>
    Cc: Thomas Gleixner <[EMAIL PROTECTED]>
    Acked-by: Ingo Molnar <[EMAIL PROTECTED]>
    Acked-by: John Stultz <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
 kernel/timer.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/kernel/timer.c b/kernel/timer.c
index ee0a2da..797cccb 100644
--- a/kernel/timer.c
+++ b/kernel/timer.c
@@ -862,6 +862,8 @@ int do_settimeofday(struct timespec *tv)
        clock->error = 0;
+       update_vsyscall(&xtime, clock);
        write_sequnlock_irqrestore(&xtime_lock, flags);
        /* signal hrtimers about time change */
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to