Re: [patch 1/3] ipc/sem: fix -rt livelock

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

 



On Sat, 2013-09-14 at 23:46 +0200, Manfred Spraul wrote: 
> Hi Mike,
> 
> On 09/13/2013 08:12 AM, Mike Galbraith wrote:
> > goto again loop can and does induce livelock in -rt.  Remove it.
> >
> > spin_unlock_wait(lock) in -rt kernels takes/releases the lock in question, so
> > all it takes to create a self perpetuating loop is for one task to start the
> > ball rolling by taking the array lock, other tasks see this, and react by
> > take/release/retry endlessly.
> I think your code inherits the race I just sent to you:
> The test of complex_count must be after spin_is_locked().
> 
> http://marc.info/?l=linux-kernel&m=137919453307294
> 
> Could you check that?

I think you're right.

> Or alternatively: Is my proposed sem_lock() function -rt friendly?

Some way of making spin_unlock_wait() _go away_ along with the livelock
would be better, but patches look good to me.  I'll apply both and stare
at the sum, and ask boxen what they think.. they're better at spotting
locking troubles ;-)

-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