diff options
| author | Qu Wenruo <[email protected]> | 2018-07-03 09:10:07 +0000 |
|---|---|---|
| committer | David Sterba <[email protected]> | 2018-08-06 11:12:42 +0000 |
| commit | 389305b2aa68723c754f88d9dbd268a400e10664 (patch) | |
| tree | 85dd721ee6bc9443517796cfdb208cc6b0e7916c /fs/btrfs/dev-replace.c | |
| parent | btrfs: tree-checker: Detect invalid and empty essential trees (diff) | |
| download | kernel-389305b2aa68723c754f88d9dbd268a400e10664.tar.gz kernel-389305b2aa68723c754f88d9dbd268a400e10664.zip | |
btrfs: relocation: Only remove reloc rb_trees if reloc control has been initialized
Invalid reloc tree can cause kernel NULL pointer dereference when btrfs
does some cleanup of the reloc roots.
It turns out that fs_info::reloc_ctl can be NULL in
btrfs_recover_relocation() as we allocate relocation control after all
reloc roots have been verified.
So when we hit: note, we haven't called set_reloc_control() thus
fs_info::reloc_ctl is still NULL.
Link: https://bugzilla.kernel.org/show_bug.cgi?id=199833
Reported-by: Xu Wen <[email protected]>
Signed-off-by: Qu Wenruo <[email protected]>
Tested-by: Gu Jinxiang <[email protected]>
Reviewed-by: David Sterba <[email protected]>
Signed-off-by: David Sterba <[email protected]>
Diffstat (limited to 'fs/btrfs/dev-replace.c')
0 files changed, 0 insertions, 0 deletions
