From patchwork Thu Jul 25 00:33:05 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andi Shyti X-Patchwork-Id: 261567 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id CAB2A2C0040 for ; Thu, 25 Jul 2013 10:33:15 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754115Ab3GYAdO (ORCPT ); Wed, 24 Jul 2013 20:33:14 -0400 Received: from etezian.org ([198.101.225.253]:40163 "EHLO mail.etezian.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752872Ab3GYAdO (ORCPT ); Wed, 24 Jul 2013 20:33:14 -0400 Received: from mail.etezian.org (p4FF5AD48.dip0.t-ipconnect.de [79.245.173.72]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mail.etezian.org (Postfix) with ESMTPSA id 82D65181B9; Wed, 24 Jul 2013 19:34:33 -0500 (CDT) From: Andi Shyti To: tytso@mit.edu, adilger.kernel@dilger.ca Cc: linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org, andi@etezian.org Subject: [PATCH] ext4: extents: len and lblock may be used uninitialized Date: Thu, 25 Jul 2013 02:33:05 +0200 Message-Id: <1374712385-6691-1-git-send-email-andi@etezian.org> X-Mailer: git-send-email 1.8.3.2 Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org if ext_debugging is enabled and path[depth].p_ext is NULL, len and lblock are printed non initialized Signed-off-by: Andi Shyti --- fs/ext4/extents.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index a618738..acaf53c 100644 --- a/fs/ext4/extents.c +++ b/fs/ext4/extents.c @@ -2195,8 +2195,8 @@ ext4_ext_put_gap_in_cache(struct inode *inode, struct ext4_ext_path *path, ext4_lblk_t block) { int depth = ext_depth(inode); - unsigned long len; - ext4_lblk_t lblock; + unsigned long len = 0; + ext4_lblk_t lblock = 0; struct ext4_extent *ex; ex = path[depth].p_ext; @@ -2233,7 +2233,6 @@ ext4_ext_put_gap_in_cache(struct inode *inode, struct ext4_ext_path *path, ext4_es_insert_extent(inode, lblock, len, ~0, EXTENT_STATUS_HOLE); } else { - lblock = len = 0; BUG(); }