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]
Message-ID: <AANLkTikFEy26V4epRGCJiDkQNQ5BH0fPP0C=4phUB=o3@mail.gmail.com>
Date:	Wed, 11 Aug 2010 18:24:04 -0700
From:	Tony Luck <tony.luck@...el.com>
To:	Michel Lespinasse <walken@...gle.com>
Cc:	Linus Torvalds <torvalds@...ux-foundation.org>,
	David Howells <dhowells@...hat.com>,
	Ingo Molnar <mingo@...e.hu>,
	Thomas Gleixner <tglx@...utronix.de>,
	LKML <linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Mike Waychison <mikew@...gle.com>,
	Suleiman Souhlal <suleiman@...gle.com>,
	Ying Han <yinghan@...gle.com>
Subject: Re: [PATCH 06/11] rwsem: wake queued readers when writer blocks on 
	active read lock

On Mon, May 24, 2010 at 1:31 PM, Michel Lespinasse <walken@...gle.com> wrote:
> This change addresses the following situation:
>
> - Thread A acquires the rwsem for read
> - Thread B tries to acquire the rwsem for write, notices there is already
>  an active owner for the rwsem.
> - Thread C tries to acquire the rwsem for read, notices that thread B already
>  tried to acquire it.
> - Thread C grabs the spinlock and queues itself on the wait queue.
> - Thread B grabs the spinlock and queues itself behind C. At this point A is
>  the only remaining active owner on the rwsem.
>
> In this situation thread B could notice that it was the last active writer
> on the rwsem, and decide to wake C to let it proceed in parallel with A
> since they both only want the rwsem for read.
>
> Signed-off-by: Michel Lespinasse <walken@...gle.com>

Linus tree this morning[1] was behaving badly on ia64 ... processes would wander
off into some unkillable state ... and since this happened to processes starting
from rc*.d I couln't get the system up to a login prompt. System is a 32-way
(4 sockets * quad-core * hyperthread).

git bisect pins the blame on this change (commit 424acaaeb...).
Reverting it (and
it's successor a8618a0e - because I assumed that it depended on 424...) gives
me a kernel that works fine.

Not sure what is wrong with this change. Maybe ia64 needs some more memory
ordering bits than the changed code provides? I can dig into it a bit
harder tomorrow,
but I thought you'd like an early heads-up in case anyone else is seeing similar
problems.

-Tony

[1] N.B. I've been on vacation - so this morning's tree was the first
I'd tried since 2.6.35
--
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