From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx2.suse.de ([195.135.220.15]:33978 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933167AbeEWOYs (ORCPT ); Wed, 23 May 2018 10:24:48 -0400 Date: Wed, 23 May 2018 16:24:46 +0200 From: Jan Kara To: Al Viro Cc: linux-fsdevel@vger.kernel.org Subject: Re: [RFC][PATCH] ext2: fix a block leak Message-ID: <20180523142446.lok5uvdl5mcna43c@quack2.suse.cz> References: <20180518000624.GQ30522@ZenIV.linux.org.uk> <20180523115824.764m62stzn33r4xj@quack2.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180523115824.764m62stzn33r4xj@quack2.suse.cz> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Wed 23-05-18 13:58:24, Jan Kara wrote: > On Fri 18-05-18 01:06:25, Al Viro wrote: > > open file, unlink it, then use ioctl(2) to make it immutable or > > append only. Now close it and watch the blocks *not* freed... > > > > Immutable/append-only checks belong in ->setattr(). > > Note: the bug is old and backport to anything prior to 737f2e93b972 > > ("ext2: convert to use the new truncate convention") will need > > these checks lifted into ext2_setattr(). > > > > Cc: stable@kernel.org > > Signed-off-by: Al Viro > > Sorry, I've been busy with other stuff after LSF/MM and then forgot about > this. Thanks for the patch! I've added the patch to my tree. Bah, and now I see (thanks Amir for the notice) you've already pushed it to Linus. Sorry for the noise. Honza -- Jan Kara SUSE Labs, CR