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:	Thu, 15 Mar 2012 23:08:22 +0100 (CET)
From:	Thomas Gleixner <tglx@...utronix.de>
To:	Al Viro <viro@...IV.linux.org.uk>
cc:	LKML <linux-kernel@...r.kernel.org>,
	Linus Torvalds <torvalds@...l.org>,
	Ingo Molnar <mingo@...e.hu>,
	Peter Zijlstra <peterz@...radead.org>,
	Nick Piggin <npiggin@...nel.dk>
Subject: Re: [patch 0/5] seqlock consolidation



On Thu, 15 Mar 2012, Al Viro wrote:

> On Thu, Mar 15, 2012 at 08:17:12PM +0100, Thomas Gleixner wrote:
> > > +			hits += replace_path(&fs->root, old_root, new_root);
> > > +			hits += replace_path(&fs->pwd, old_root, new_root);
> > 
> > Wouldn't it be simpler to just do: 
> > 
> > +			count += replace_path(&fs->root, old_root, new_root);
> > +			count += replace_path(&fs->pwd, old_root, new_root);
> > 
> > > +			write_seqcount_end(&fs->seq);
> > > +			while (hits--) {
> > >  				count++;
> > 
> > Instead of that loop ?
> 
> This loop also contains path_get_longterm() and we need to do it before
> dropping fs->lock.  We are holding a reference to new_root, all right,
> but once it's place into ->fs->{root,pwd} of another task and ->fs->lock
> is dropped, there's nothing to stop that task of doing chdir() and dropping
> its reference.  Which could outweight the single reference we are holding
> pretty soon...

Oops, sorry I missed that path_get_longterm() in the loop due to the
+/- forrest around it.

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