From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Date: Mon, 21 Feb 2011 07:46:35 -0500 Subject: [Cluster-devel] [PATCH] Check for immutable flag in fallocate path In-Reply-To: <4D6221B8.9040303@gmail.com> References: <4D6221B8.9040303@gmail.com> Message-ID: <20110221124635.GA5525@infradead.org> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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.