Skip to contentSkip to conversation

Btrfs: don't null pointer deref on abort

PATCH New Josef Bacik 1 participant 1 message May 8, 2013 Btrfs file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Btrfs: don't null pointer deref on abort

I'm sorry, theres no excuse for this sort of work. We need to use root->leafsize since eb may be NULL. Thanks,

---
 fs/btrfs/disk-io.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
fs/btrfs/disk-io.c +1 -1
index e8b5027..19d7e63 100644
@@ -3752,7 +3752,7 @@ static int btrfs_destroy_marked_extents(struct btrfs_root *root,
 		while (start <= end) {
 			eb = btrfs_find_tree_block(root, start,
 						   root->leafsize);
-			start += eb->len;
+			start += root->leafsize;
 			if (!eb)
 				continue;
 			wait_on_extent_buffer_writeback(eb);
Signature · 1 line
1.7.7.6