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] [day] [month] [year] [list]
Date:	Wed, 4 Mar 2015 15:03:28 +0100
From:	Daniel Wagner <daniel.wagner@...-carit.de>
To:	Jeff Layton <jlayton@...chiereds.net>
CC:	Andi Kleen <andi@...stfloor.org>, <linux-fsdevel@...r.kernel.org>,
	<linux-kernel@...r.kernel.org>, John Kacur <jkacur@...hat.com>,
	Alexander Viro <viro@...iv.linux.org.uk>,
	"J. Bruce Fields" <bfields@...ldses.org>
Subject: Re: [RFC v1 0/5] fs/locks: Use plain percpu spinlocks instead of
 lglock to protect file_lock

On 03/03/2015 01:29 AM, Jeff Layton wrote:
>> Hmm, are you sure about that? I read the code this way that when a lock
>> is added to flock_list it stays on that CPU. The locks are not moved
>> from one flock_list to another during their existent.
>>
> 
> Yes, I'm sure. When a file lock is acquired, we assign the fl_link_cpu
> to the current CPU and add it to the current CPU's global list. When
> the lock is released, any blocked lock that might have been blocking on
> it could acquire it at that point, and that doesn't necessarily occur
> on the same CPU as where the lock was originally held.
> 
> So, it's entirely possible that between when you drop the spinlock on
> one CPU and pick it up on another, the lock could have been released
> and then reacquired on a different CPU.

D'oh. I am an idiot. I didn't really understand it the first time. Yes,
you are right.

cheers,
daniel
--
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