aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorDave Kleikamp <shaggy@austin.ibm.com>2006-10-17 03:09:35 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-17 11:18:43 -0400
commit5eb30790d4ccd3409240a80eaf9ab76b4fb75fd8 (patch)
treecab8f6c10fc4e63f3ffe2df1c67591adbb5c86a0 /fs
parent3f4a0b917ce72ef47e438d354c433eb645218e87 (diff)
[PATCH] null dereference in fs/jbd2/journal.c
This is Eric Sesterhenn's jbd patch applied to jbd2. Commit: 41716c7c21b15e7ecf14f0caf1eef3980707fb74 His words: Since commit d1807793e1e7e502e3dc047115e9dbc3b50e4534 we dereference a NULL pointer. Coverity id #1432. We set journal to NULL, and use it directly afterwards. Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com> Cc: Eric Sesterhenn <snakebyte@gmx.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/jbd2/journal.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c
index 10db92ced014..c60f378b0f76 100644
--- a/fs/jbd2/journal.c
+++ b/fs/jbd2/journal.c
@@ -725,6 +725,7 @@ journal_t * jbd2_journal_init_dev(struct block_device *bdev,
725 __FUNCTION__); 725 __FUNCTION__);
726 kfree(journal); 726 kfree(journal);
727 journal = NULL; 727 journal = NULL;
728 goto out;
728 } 729 }
729 journal->j_dev = bdev; 730 journal->j_dev = bdev;
730 journal->j_fs_dev = fs_dev; 731 journal->j_fs_dev = fs_dev;
@@ -735,7 +736,7 @@ journal_t * jbd2_journal_init_dev(struct block_device *bdev,
735 J_ASSERT(bh != NULL); 736 J_ASSERT(bh != NULL);
736 journal->j_sb_buffer = bh; 737 journal->j_sb_buffer = bh;
737 journal->j_superblock = (journal_superblock_t *)bh->b_data; 738 journal->j_superblock = (journal_superblock_t *)bh->b_data;
738 739out:
739 return journal; 740 return journal;
740} 741}
741 742