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:	Fri, 10 Jul 2015 10:49:21 +1000
From:	Dave Chinner <david@...morbit.com>
To:	Lukas Czerner <lczerner@...hat.com>
Cc:	viro@...IV.linux.org.uk, bfields@...ldses.org,
	linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: Re: [RFC][PATCH] fs: Prevent syncing frozen file system

On Fri, Jul 10, 2015 at 09:40:12AM +1000, Dave Chinner wrote:
> On Thu, Jul 09, 2015 at 07:45:45PM +0200, Lukas Czerner wrote:
> > Currently we can end up in a deadlock because of broken
> > sb_start_write -> s_umount ordering.
> > 
> > The race goes like this:
> > 
> >  - write the file
> >  - unlink the file - final_iput will not be calles as file is opened
> >  - freeze the file system
> >  - Now simultaneously close the file and call sync (or syncfs on that
> >    particular file system). Sync will get to wait_sb_inodes() where it will
> >    grab the referece to the inode (__iget()) and later to call iput().
> 
> This problem goes away with the sync scalability patchset that josef
> has been trying to get merged:
> 
> git://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git superblock-scaling
> 
> That patchset removes the full sb inodes list walk in
> wait_sb_inodes() and replaces it with a walk of inodes cleaned
> during the sync, which will be an empty list in the case of sync
> running on an empty filesystem. This commit does the work:

s/empty/frozen

-Dave.
-- 
Dave Chinner
david@...morbit.com
--
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