Skip to content

Commit c4c23fb

Browse files
committed
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs
Pull btrfs fix from Chris Mason: "It's a one liner for an error cleanup path that leads to crashes" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs: Btrfs: fix kfree on list_head in btrfs_lookup_csums_range error cleanup
2 parents 0b0c7db + 6e5aafb commit c4c23fb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/btrfs/file-item.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ int btrfs_lookup_csums_range(struct btrfs_root *root, u64 start, u64 end,
413413
ret = 0;
414414
fail:
415415
while (ret < 0 && !list_empty(&tmplist)) {
416-
sums = list_entry(&tmplist, struct btrfs_ordered_sum, list);
416+
sums = list_entry(tmplist.next, struct btrfs_ordered_sum, list);
417417
list_del(&sums->list);
418418
kfree(sums);
419419
}

0 commit comments

Comments
 (0)