diff options
author | Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> | 2008-02-10 07:07:28 +0100 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2008-02-10 07:07:28 +0100 |
commit | 42a10add852e6291a7544afd8a286622a3e6ae76 (patch) | |
tree | 3acf1bdd712f1a53181b1b386c4be8ab0fa58713 /fs/ext4 | |
parent | ext4: Don't set EXTENTS_FL flag for fast symlinks (diff) | |
download | linux-42a10add852e6291a7544afd8a286622a3e6ae76.tar.xz linux-42a10add852e6291a7544afd8a286622a3e6ae76.zip |
ext4: Fix null bh pointer dereference in mballoc
Repoted by Adrian Bunk <bunk@kernel.org>:
The Coverity checker spotted the following NULL dereference:
static int ext4_mb_mark_diskspace_used
{
...
if (!bitmap_bh)
goto out_err;
...
out_err:
sb->s_dirt = 1;
put_bh(bitmap_bh);
...
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Mingming Cao <cmm@us.ibm.com>
Diffstat (limited to 'fs/ext4')
-rw-r--r-- | fs/ext4/mballoc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c index 76e5fedc0a0b..06d1f5292d3a 100644 --- a/fs/ext4/mballoc.c +++ b/fs/ext4/mballoc.c @@ -3069,7 +3069,7 @@ static int ext4_mb_mark_diskspace_used(struct ext4_allocation_context *ac, out_err: sb->s_dirt = 1; - put_bh(bitmap_bh); + brelse(bitmap_bh); return err; } |