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: <20090424084820.GA28592@infradead.org>
Date:	Fri, 24 Apr 2009 04:48:20 -0400
From:	Christoph Hellwig <hch@...radead.org>
To:	Al Viro <viro@...IV.linux.org.uk>
Cc:	Alessio Igor Bogani <abogani@...ware.it>,
	Jonathan Corbet <corbet@....net>,
	Fr??d??ric Weisbecker <fweisbec@...il.com>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	LKML <linux-kernel@...r.kernel.org>,
	LFSDEV <linux-fsdevel@...r.kernel.org>,
	Ingo Molnar <mingo@...e.hu>, Matthew Wilcox <matthew@....cx>
Subject: Re: [PATCH 1/1] vfs: umount_begin BKL pushdown v2

On Fri, Apr 24, 2009 at 08:15:36AM +0100, Al Viro wrote:
> On Fri, Apr 24, 2009 at 08:13:12AM +0100, Al Viro wrote:
> > On Fri, Apr 24, 2009 at 09:06:53AM +0200, Alessio Igor Bogani wrote:
> > >  static void cifs_umount_begin(struct super_block *sb)
> > >  {
> > > -	struct cifs_sb_info *cifs_sb = CIFS_SB(sb);
> > > +	struct cifs_sb_info *cifs_sb;
> > >  	struct cifsTconInfo *tcon;
> > >  
> > > -	if (cifs_sb == NULL)
> > > +	lock_kernel();
> > > +	cifs_sb = CIFS_SB(sb);
> > > +
> > > +	if (cifs_sb == NULL) {
> > > +		unlock_kernel();
> > >  		return;
> > > +	}
> > >  
> > >  	tcon = cifs_sb->tcon;
> > > -	if (tcon == NULL)
> > > +	if (tcon == NULL) {
> > > +		unlock_kernel();
> > >  		return;
> > > +	}
> > 
> > AFAICS, both CIFS_SB(sb) and ->tcon are assign-once, so lock_kernel() should
> > really go here (if it can't be removed completely, of course, but that's up
> > to CIFS folks).  Applied with such modification.
> 
> PS: I suspect that checks for NULL are actually "what if kernel memory got
> corrupted", but I'm too lazy to verify that at the moment; again, up to
> CIFS folks.

NULL checks are superflous here, but that should be a separate patch.

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