diff options
| author | 2026-02-19 19:19:00 +0000 | |
|---|---|---|
| committer | 2026-03-17 11:43:08 +0100 | |
| commit | adbb0ebacc3223a2dc2e58ef3d4c10f5e9653f09 (patch) | |
| tree | 2a6a89d83f781932ae2bbaecc65a37fd2f7aa90d /tools/testing/selftests/dm-verity/git:/ssh:/git@git.zx2c4.com | |
| parent | btrfs: hold block group reference during entire move_existing_remap() (diff) | |
btrfs: check block group before marking it unused in balance_remap_chunks()
Fix a potential segfault in balance_remap_chunks(): if we quit early
because btrfs_inc_block_group_ro() fails, all the remaining items in the
chunks list will still have their bg value set to NULL. It's thus not
safe to dereference this pointer without checking first.
Reported-by: Chris Mason <clm@fb.com>
Link: https://lore.kernel.org/linux-btrfs/20260125120717.1578828-1-clm@meta.com/
Fixes: 81e5a4551c32 ("btrfs: allow balancing remap tree")
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Mark Harmstone <mark@harmstone.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'tools/testing/selftests/dm-verity/git:/ssh:/git@git.zx2c4.com')
0 files changed, 0 insertions, 0 deletions
