diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-11-09 23:30:24 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-11-09 23:30:24 +0100 |
commit | c4c23fb6f2b17c922b493f79cf27a0d32397f461 (patch) | |
tree | 64b651ddc98fde641da2e1dd93d1bdca619565a4 /fs | |
parent | Merge tag 'driver-core-3.18-rc4' of git://git.kernel.org/pub/scm/linux/kernel... (diff) | |
parent | Btrfs: fix kfree on list_head in btrfs_lookup_csums_range error cleanup (diff) | |
download | linux-c4c23fb6f2b17c922b493f79cf27a0d32397f461.tar.xz linux-c4c23fb6f2b17c922b493f79cf27a0d32397f461.zip |
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
Diffstat (limited to 'fs')
-rw-r--r-- | fs/btrfs/file-item.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/file-item.c b/fs/btrfs/file-item.c index 783a94355efd..84a2d1868271 100644 --- a/fs/btrfs/file-item.c +++ b/fs/btrfs/file-item.c @@ -413,7 +413,7 @@ int btrfs_lookup_csums_range(struct btrfs_root *root, u64 start, u64 end, ret = 0; fail: while (ret < 0 && !list_empty(&tmplist)) { - sums = list_entry(&tmplist, struct btrfs_ordered_sum, list); + sums = list_entry(tmplist.next, struct btrfs_ordered_sum, list); list_del(&sums->list); kfree(sums); } |