Re: [PATCH 1/2] time: x86: Fix race switching from vsyscall tonon-vsyscall clock

From: Thomas Gleixner
Date: Wed Mar 14 2012 - 20:34:26 EST


On Wed, 14 Mar 2012, John Stultz wrote:
> notrace static noinline int do_realtime(struct timespec *ts)
> {
> unsigned long seq, ns;
> + int mode;

Please keep a newline between declarations and code.

> do {
> seq = read_seqbegin(&gtod->lock);
> + mode = gtod->clock.vclock_mode;
> ts->tv_sec = gtod->wall_time_sec;
> ts->tv_nsec = gtod->wall_time_nsec;
> ns = vgetns();
> } while (unlikely(read_seqretry(&gtod->lock, seq)));
> +
> timespec_add_ns(ts, ns);
> - return 0;
> + return mode;
> }
>
> notrace static noinline int do_monotonic(struct timespec *ts)
> {
> unsigned long seq, ns, secs;
> + int mode;

etc. etc.

> do {
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/