Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755628Ab1BUMqi (ORCPT ); Mon, 21 Feb 2011 07:46:38 -0500 Received: from bombadil.infradead.org ([18.85.46.34]:44557 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753571Ab1BUMqg (ORCPT ); Mon, 21 Feb 2011 07:46:36 -0500 Date: Mon, 21 Feb 2011 07:46:35 -0500 From: Christoph Hellwig To: Marco Stornelli Cc: Linux Kernel , cluster-devel@redhat.com, Linux FS Devel , linux-ext4@vger.kernel.org, linux-btrfs@vger.kernel.org, xfs@oss.sgi.com Subject: Re: [PATCH] Check for immutable flag in fallocate path Message-ID: <20110221124635.GA5525@infradead.org> References: <4D6221B8.9040303@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4D6221B8.9040303@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 823 Lines: 18 On Mon, Feb 21, 2011 at 09:26:32AM +0100, Marco Stornelli wrote: > From: Marco Stornelli > > All fs must check for the immutable flag in their fallocate callback. > It's possible to have a race condition in this scenario: an application > open a file in read/write and it does something, meanwhile root set the > immutable flag on the file, the application at that point can call > fallocate with success. Only Ocfs2 check for the immutable flag at the > moment. Please add the check in fs/open.c:do_fallocate() so that it covers all filesystems. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/