On Mon, 24 Sep 2007, Thomas Gleixner wrote:
> > struct timerfd_ctx {
> > struct hrtimer tmr;
> > + int clockid;
> > ktime_t tintv;
> > wait_queue_head_t wqh;
> > int expired;
> > + u64 ticks;
> > };
>
> Can you please restructure the struct in a way which does not result in
> padding by the compiler ?
>
> struct timerfd_ctx {
> struct hrtimer tmr;
> ktime_t tintv;
> wait_queue_head_t wqh;
> u64 ticks;
> int expired;
> int clockid;
> };
Sure.
> > + ticks += (u64)
> > hrtimer_forward(&ctx->tmr,
> > hrtimer_cb_get_time(&ctx->tmr),
>
> You need to use ctx->tmr.base->get_time() here, otherwise you might read
> a stale time value (in case that CONFIG_HIGH_RES_TIMERS is off).
Is the particular position of hrtimer_cb_get_time() in the code that would
break here? Because function was added by your patch ;)
Did something change later?
> > +err_kfree_ctx:
> > + kfree(ctx);
> > + return error;
>
> You really can avoid the goto here.
Ack.
- Davide
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]