> > + /* > > + * Use temporary variable so get_seconds() cannot catch > > + * an intermediate xtime_cache.tv_sec value. > > + * The ACCESS_ONCE() keeps the compiler from optimizing > > + * out the intermediate value. > > + */ > > + struct timespec ts = xtime; > > + timespec_add_ns(&ts, nsec); > > + ACCESS_ONCE(xtime_cache) = ts; > > } > > I think this works, Andi?
Yes looks good. Thanks. -Andi -- [email protected] -- Speaking for myself only. _______________________________________________ stable mailing list [email protected] http://linux.kernel.org/mailman/listinfo/stable
