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
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 06 Mar 2015 17:53:26 -0800
From:	Jason Low <jason.low2@...com>
To:	Linus Torvalds <torvalds@...ux-foundation.org>
Cc:	Davidlohr Bueso <dave@...olabs.net>,
	Ingo Molnar <mingo@...nel.org>,
	Sasha Levin <sasha.levin@...cle.com>,
	Peter Zijlstra <peterz@...radead.org>,
	LKML <linux-kernel@...r.kernel.org>,
	Dave Jones <davej@...emonkey.org.uk>, jason.low2@...com
Subject: Re: softlockups in multi_cpu_stop

On Fri, 2015-03-06 at 13:24 -0800, Linus Torvalds wrote:
> On Fri, Mar 6, 2015 at 1:12 PM, Jason Low <jason.low2@...com> wrote:
> >
> > +       while (true) {
> > +               if (sem->owner != owner)
> > +                       break;
> 
> That looks *really* odd.
> 
> Why is this not
> 
>         while (sem->owner == owner) {

Yes, this looks more readable.

That while (true) thing was something we recently did for mutexes which
was why I originally had that.

> Also, this "barrier()" now lost the comment:
> 
> > +               barrier();
> 
> so it looks very odd indeed.

Right, we should keep the comment for the barrier().

--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ