Re: [ANNOUNCE] 3.14-rt1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2014-04-28 at 10:18 -0400, Steven Rostedt wrote: 
> On Mon, 28 Apr 2014 11:09:46 +0200
> Mike Galbraith <umgwanakikbuti@xxxxxxxxx> wrote:
>  
> > migrate_disable-pushd-down-in-atomic_dec_and_spin_lo.patch
> > 
> > bug: migrate_disable() after blocking is too late.
> > 
> > @@ -1028,12 +1028,12 @@ int atomic_dec_and_spin_lock(atomic_t *a
> >         /* Subtract 1 from counter unless that drops it to 0 (ie. it was 1) */
> >         if (atomic_add_unless(atomic, -1, 1))
> >                 return 0;
> > -       migrate_disable();
> >         rt_spin_lock(lock);
> > -       if (atomic_dec_and_test(atomic))
> > +       if (atomic_dec_and_test(atomic)){
> > +               migrate_disable();
> 
> Makes sense, as the CPU can go offline right after the lock is grabbed
> and before the migrate_disable() is called.
> 
> Seems that migrate_disable() must be called before taking the lock as
> it is done in every other location.

And for tasklist_lock, seems you also MUST do that prior to trylock as
well, else you'll run afoul of the hotplug beast.

-Mike


--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux