From patchwork Fri Aug 7 18:19:49 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: roel kluin X-Patchwork-Id: 30957 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 AF77AB70C4 for ; Sat, 8 Aug 2009 04:16:43 +1000 (EST) Received: by ozlabs.org (Postfix) id 9FF14DDD0B; Sat, 8 Aug 2009 04:16:43 +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 1D2FEDDD01 for ; Sat, 8 Aug 2009 04:16:43 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932258AbZHGSQT (ORCPT ); Fri, 7 Aug 2009 14:16:19 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932235AbZHGSQS (ORCPT ); Fri, 7 Aug 2009 14:16:18 -0400 Received: from mail-ew0-f214.google.com ([209.85.219.214]:33786 "EHLO mail-ew0-f214.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932258AbZHGSQO (ORCPT ); Fri, 7 Aug 2009 14:16:14 -0400 Received: by ewy10 with SMTP id 10so1722805ewy.37 for ; Fri, 07 Aug 2009 11:16:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:content-type :content-transfer-encoding; bh=1JVPSsa+6CB/VuPihTpaNqyEUoX9bcIdKKeg80LyNJM=; b=KsoU8pXD46eqqQPZQcy8tud4xs98F8Npqx00ITo8w4ZaheHxpx+bAAam9Dkkm+SKFn NzYT8drh8jPYxE5xD9FrJIFttXzYDoneqYpX9OcK5xDEUrFa0ab/qLazd6pbwLNAeuSY asT//6ANoiZr+BuIBhknjpD23I3gkrPPF2EPU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; b=JgCPwDOydUu891H7PY6Vxn4BCkkCTOEPLFKoB5dF4mOg6Zswr+iejM7tzC/slPmJDN phXw4VRFBXNITjqRZci/+aKksc6pGCvcaq252m5TRTA8utMR/gnL3wpjcv4jJA+TTxGH k2nJXVj9xGZG0xoXQyJraC0TrDT+h1EEoC4/o= Received: by 10.210.20.6 with SMTP id 6mr1305115ebt.73.1249668974610; Fri, 07 Aug 2009 11:16:14 -0700 (PDT) Received: from zoinx.mars (d133062.upc-d.chello.nl [213.46.133.62]) by mx.google.com with ESMTPS id 10sm3726247eyd.37.2009.08.07.11.16.13 (version=SSLv3 cipher=RC4-MD5); Fri, 07 Aug 2009 11:16:14 -0700 (PDT) Message-ID: <4A7C7045.7040704@gmail.com> Date: Fri, 07 Aug 2009 20:19:49 +0200 From: Roel Kluin User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1b3pre) Gecko/20090513 Fedora/3.0-2.3.beta2.fc11 Thunderbird/3.0b2 MIME-Version: 1.0 To: "Theodore Ts'o" , linux-ext4@vger.kernel.org, Andrew Morton Subject: ext4: buffer underrun in ext4_ext_split()? Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org If `depth' is less or equal to `at', a buffer underrun occurs Signed-off-by: Roel Kluin --- I am not sure whether this is possible. -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index afea652..25bc182 100644 --- a/fs/ext4/extents.c +++ b/fs/ext4/extents.c @@ -822,7 +822,7 @@ static int ext4_ext_split(handle_t *handle, struct inode *inode, } /* initialize new leaf */ - newblock = ablocks[--a]; + newblock = a ? ablocks[--a] : 0; BUG_ON(newblock == 0); bh = sb_getblk(inode->i_sb, newblock); if (!bh) {