lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Sat, 17 Sep 2011 14:32:01 +0200 From: Manfred Spraul <manfred@...orfullife.com> To: Peter Zijlstra <a.p.zijlstra@...llo.nl> CC: Ingo Molnar <mingo@...e.hu>, Thomas Gleixner <tglx@...utronix.de>, linux-kernel@...r.kernel.org, Steven Rostedt <rostedt@...dmis.org>, Darren Hart <dvhart@...ux.intel.com>, David Miller <davem@...emloft.net>, Eric Dumazet <eric.dumazet@...il.com>, Mike Galbraith <efault@....de> Subject: Re: [RFC][PATCH 3/3] ipc/sem: Rework wakeup scheme On 09/16/2011 02:18 PM, Peter Zijlstra wrote: > On Thu, 2011-09-15 at 19:29 +0200, Manfred Spraul wrote: >> What is broken? > So basically sembench was broken and the futex patch is causing spurious > wakeups. > > I've got the below patch to fix up the sem code. > > One more question, do the sem wakeups need to be issued in FIFO order? > There's a comment in there: > > * User space visible behavior: > * - FIFO ordering for semop() operations (just FIFO, not starvation > * protection) > > that seems to suggest the sem ops processing is in FIFO order, but does > the user visible effect propagate to the wakeup order? I'd ask the question the other way arould: Is the wakeup order user visible? IMHO: No, the scheduler might reorder the tasks anyway. > > /* > * If an interrupt occurred we have to clean up the queue > */ > if (timeout&& jiffies_left == 0) > error = -EAGAIN; > + > + if (error == -EINTR&& !signal_pending(current)) > + goto retry; > + > unlink_queue(sma,&queue); > > out_unlock_free: Good solution. -ERESTARTNOHAND would be even better, but this is definitively better than the current code. -- Manfred -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists