From mboxrd@z Thu Jan 1 00:00:00 1970 From: Al Viro Subject: Re: [PATCH] Introduce freeze_super and thaw_super for the fsfreeze ioctl Date: Tue, 23 Mar 2010 23:47:19 +0000 Message-ID: <20100323234719.GM30031@ZenIV.linux.org.uk> References: <20100323142200.GA2381@localhost.localdomain> <20100323142843.GG30031@ZenIV.linux.org.uk> <20100323143456.GC2381@localhost.localdomain> <20100323144828.GH30031@ZenIV.linux.org.uk> <20100323150301.GD2381@localhost.localdomain> <20100323150923.GI30031@ZenIV.linux.org.uk> <4BA94157.6090907@crca.org.au> <20100323231802.GL30031@ZenIV.linux.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Josef Bacik , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, chris.mason@oracle.com, hch@lst.de To: Nigel Cunningham Return-path: Content-Disposition: inline In-Reply-To: <20100323231802.GL30031@ZenIV.linux.org.uk> Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Tue, Mar 23, 2010 at 11:18:03PM +0000, Al Viro wrote: > [snip the horror] > > a) traversing superblock list without any locking whatsoever > b) accessing superblock fields <....> > c) <.........................> without making sure that it's not > going to disappear > d) calling freeze_bdev() without any warranties that its argument > is not going to be freed under you > e) layering violations all over the place > etc. BTW, superblock can be kept alive by an opened file. umount -l, for example, will give that. So it can get freed whenever the last reference to struct file can go away (AF_UNIX garbage collection, etc.)