On Tue, 27 Aug 2019, Frederic Weisbecker wrote:

> On Wed, Aug 21, 2019 at 09:09:25PM +0200, Thomas Gleixner wrote:
> >  /**
> > @@ -92,14 +130,10 @@ struct posix_cputimers {
> >  
> >  static inline void posix_cputimers_init(struct posix_cputimers *pct)
> >  {
> > -   pct->timers_active = 0;
> > -   pct->expiry_active = 0;
> 
> No more need to initialize these?
> 
> > +   memset(pct->bases, 0, sizeof(pct->bases));

memset() does that IIRC :)

> >     pct->bases[0].nextevt = U64_MAX;
> >     pct->bases[1].nextevt = U64_MAX;
> >     pct->bases[2].nextevt = U64_MAX;
> > -   INIT_LIST_HEAD(&pct->bases[0].cpu_timers);
> > -   INIT_LIST_HEAD(&pct->bases[1].cpu_timers);
> > -   INIT_LIST_HEAD(&pct->bases[2].cpu_timers);
> >  }
> 
> [...]
> 
> > @@ -393,15 +395,15 @@ static int posix_cpu_timer_del(struct k_
> >     sighand = lock_task_sighand(p, &flags);
> >     if (unlikely(sighand == NULL)) {
> >             /*
> > -            * We raced with the reaping of the task.
> > -            * The deletion should have cleared us off the list.
> > +            * This raced with the reaping of the task. The exit cleanup
> > +            * should have removed this timer from the timer queue.
> >              */
> > -           WARN_ON_ONCE(!list_empty(&timer->it.cpu.entry));
> > +           WARN_ON_ONCE(ctmr->head || timerqueue_node_queued(&ctmr->node));
> 
> Should we clear ctmr->head upon cleanup_timerqueue() ?

Probably.
 

Reply via email to