[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <479E22D4.6070300@redhat.com>
Date: Mon, 28 Jan 2008 12:45:40 -0600
From: Eric Sandeen <sandeen@...hat.com>
To: "Theodore Ts'o" <tytso@....EDU>
CC: linux-kernel@...r.kernel.org, Alex Tomas <alex@...sterfs.com>,
Andreas Dilger <adilger@...sterfs.com>,
"Aneesh Kumar K.V" <aneesh.kumar@...ux.vnet.ibm.com>,
Eric Sandeen <sandeen@...hat.com>
Subject: Re: [PATCH 41/49] ext4: Add multi block allocator for ext4
The latest version of the mballoc patch in the ext4dev git patch queue
has a potential uninitialized use: CC [M] fs/ext4/mballoc.o
fs/ext4/mballoc.c: In function ‘ext4_mb_free_blocks’:
fs/ext4/mballoc.c:4408: warning: ‘bitmap_bh’ may be used uninitialized in this function
There are 2 gotos which will call put_bh on a NULL bitmap_bh.
Signed-off-by: Eric Sandeen <sandeen@...hat.com>
Index: linux-2.6.24-rc6-mm1/fs/ext4/mballoc.c
===================================================================
--- linux-2.6.24-rc6-mm1.orig/fs/ext4/mballoc.c
+++ linux-2.6.24-rc6-mm1/fs/ext4/mballoc.c
@@ -4405,7 +4405,7 @@ void ext4_mb_free_blocks(handle_t *handl
unsigned long block, unsigned long count,
int metadata, unsigned long *freed)
{
- struct buffer_head *bitmap_bh;
+ struct buffer_head *bitmap_bh = NULL;
struct super_block *sb = inode->i_sb;
struct ext4_allocation_context ac;
struct ext4_group_desc *gdp;
@@ -4546,7 +4546,8 @@ do_more:
}
sb->s_dirt = 1;
error_return:
- put_bh(bitmap_bh);
+ if (bitmap_bh)
+ put_bh(bitmap_bh);
ext4_std_error(sb, err);
return;
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists