diff options
author | Qinghuang Feng <qhfeng.kernel@gmail.com> | 2009-01-21 16:49:16 +0100 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2009-01-21 16:49:16 +0100 |
commit | 7e6628544abad773222d8b177f738ac2db1859de (patch) | |
tree | b1bdb87b850ed4639f45b1ca10d739f90e186646 /fs/proc | |
parent | Btrfs: fix stop searching test in replace_one_extent (diff) | |
download | linux-7e6628544abad773222d8b177f738ac2db1859de.tar.xz linux-7e6628544abad773222d8b177f738ac2db1859de.zip |
Btrfs: open_ctree() error handling can oops on fs_info
a bug in open_ctree:
struct btrfs_root *open_ctree(..)
{
....
if (!extent_root || !tree_root || !fs_info ||
!chunk_root || !dev_root || !csum_root) {
err = -ENOMEM;
goto fail;
//When code flow goes to "fail", fs_info may be NULL or uninitialized.
}
....
fail:
btrfs_close_devices(fs_info->fs_devices);// !
btrfs_mapping_tree_free(&fs_info->mapping_tree);// !
kfree(extent_root);
kfree(tree_root);
bdi_destroy(&fs_info->bdi);// !
...
)
Signed-off-by: Qinghuang Feng <qhfeng.kernel@gmail.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/proc')
0 files changed, 0 insertions, 0 deletions