From patchwork Thu Jun 18 22:44:51 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 28884 Return-Path: X-Original-To: patchwork-incoming@bilbo.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from ozlabs.org (ozlabs.org [203.10.76.45]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mx.ozlabs.org", Issuer "CA Cert Signing Authority" (verified OK)) by bilbo.ozlabs.org (Postfix) with ESMTPS id 60671B71D3 for ; Fri, 19 Jun 2009 08:45:19 +1000 (EST) Received: by ozlabs.org (Postfix) id 4FEF2DDD1C; Fri, 19 Jun 2009 08:45:19 +1000 (EST) Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id C7299DDD1B for ; Fri, 19 Jun 2009 08:45:18 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758897AbZFRWoy (ORCPT ); Thu, 18 Jun 2009 18:44:54 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1758943AbZFRWox (ORCPT ); Thu, 18 Jun 2009 18:44:53 -0400 Received: from smtp1.linux-foundation.org ([140.211.169.13]:39601 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758897AbZFRWox (ORCPT ); Thu, 18 Jun 2009 18:44:53 -0400 Received: from imap1.linux-foundation.org (imap1.linux-foundation.org [140.211.169.55]) by smtp1.linux-foundation.org (8.14.2/8.13.5/Debian-3ubuntu1.1) with ESMTP id n5IMipFQ005741 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 18 Jun 2009 15:44:52 -0700 Received: from localhost.localdomain (localhost [127.0.0.1]) by imap1.linux-foundation.org (8.13.5.20060308/8.13.5/Debian-3ubuntu1.1) with ESMTP id n5IMiprI003945; Thu, 18 Jun 2009 15:44:51 -0700 Message-Id: <200906182244.n5IMiprI003945@imap1.linux-foundation.org> Subject: [merged] ext3-fix-chain-verification-in-ext3_get_blocks.patch removed from -mm tree To: jack@suse.cz, linux-ext4@vger.kernel.org, mm-commits@vger.kernel.org From: akpm@linux-foundation.org Date: Thu, 18 Jun 2009 15:44:51 -0700 X-Spam-Status: No, hits=-3.502 required=5 tests=AWL, BAYES_00, OSDL_HEADER_SUBJECT_BRACKETED X-Spam-Checker-Version: SpamAssassin 3.2.4-osdl_revision__1.47__ X-MIMEDefang-Filter: lf$Revision: 1.188 $ X-Scanned-By: MIMEDefang 2.63 on 140.211.169.13 Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org The patch titled ext3: fix chain verification in ext3_get_blocks() has been removed from the -mm tree. Its filename was ext3-fix-chain-verification-in-ext3_get_blocks.patch This patch was dropped because it was merged into mainline or a subsystem tree The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: ext3: fix chain verification in ext3_get_blocks() From: Jan Kara Chain verification in ext3_get_blocks() has been hosed since it called verify_chain(chain, NULL) which always returns success. As a result readers could in theory race with truncate. On the other hand the race probably cannot happen with the current locking scheme, since by the time ext3_truncate() is called all the pages are already removed and hence get_block() shouldn't be called on such pages... Signed-off-by: Jan Kara Cc: Signed-off-by: Andrew Morton --- fs/ext3/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -puN fs/ext3/inode.c~ext3-fix-chain-verification-in-ext3_get_blocks fs/ext3/inode.c --- a/fs/ext3/inode.c~ext3-fix-chain-verification-in-ext3_get_blocks +++ a/fs/ext3/inode.c @@ -820,7 +820,7 @@ int ext3_get_blocks_handle(handle_t *han while (count < maxblocks && count <= blocks_to_boundary) { ext3_fsblk_t blk; - if (!verify_chain(chain, partial)) { + if (!verify_chain(chain, chain + depth - 1)) { /* * Indirect block might be removed by * truncate while we were reading it.