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, 2 Apr 2014 10:37:04 -0400
From:	Theodore Ts'o <tytso@....edu>
To:	Matthew Wilcox <willy@...ux.intel.com>
Cc:	linux-ext4@...r.kernel.org
Subject: Re: Race affecting superblock buffer_head

On Wed, Apr 02, 2014 at 10:07:57AM -0400, Matthew Wilcox wrote:
> Looking forther down the call stack, this call to ext4_commit_super()
> comes via __ext4_abort's call to save_error_info() which calls
> ext4_commit_super().  I've had a good look around, and I can't see any
> locking that prevents ext4_commit_super() from being called in parallel
> with ... well, anything else.

Ext4_commit_super() only gets called:

* When mounting and unmounting the file system (where the code path
	has exclusive access to the superblock)
* When remounting the file system read-only
* When reporting an error

So what you're probably seeing is a case where we have multiple cpu's
calling some form of ext4_error* in parallel, and indeed there is
nothing prevent us from trying to update the superblock and calling
ext4_commit_super() in parallel.

We'll need to be careful because at the moment we don't make any
assumptions about any mutexes being locked --- or not locked --- when
we call into ext4_error().

Since this is happening on the error paths, and these are just
warnings, it's not a disaster.  But we really should do something to
clean up the warning, and the fact that we aren't being careful about
what happens if two CPU's are trying to update the s_last_error_*
information might mean that the information that we get back is
misleading, so this is something we should fix.

Thanks for pointing this out!

					- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ