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:	Sat, 16 Oct 2010 12:19:14 -0400
From:	Christoph Hellwig <hch@...radead.org>
To:	Nick Piggin <npiggin@...nel.dk>
Cc:	Christoph Hellwig <hch@...radead.org>,
	Dave Chinner <david@...morbit.com>,
	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 14/18] fs: Protect inode->i_state with th einode->i_lock

On Sat, Oct 16, 2010 at 06:57:09PM +1100, Nick Piggin wrote:
> > > Ah, done thinking now! I was so the i_state field had been set
> > > before the inode was added to various lists and potentially
> > > accessable to other threads. I should probably add a comment to that
> > > effect, right?
> > 
> > Yes, please.
> 
> This is due to i_lock not covering all the icache state of the inode,
> so you have to make these synchronisation changes like this.
> 
> I much prefer such proposals to go at the end of my series, where I
> will probably nack them (and use rcu instead if the remaining trylocks
> are such a big issue).

To get back to the context - what it changes is setting up i_state =
I_NEW before adding the inode to the sb-list and the hash.  Making
sure objects are fully set up before adding to a list is always a good
idea, and really has nothing to do with RCU.

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