alistair23-linux/fs/btrfs
Liu Bo 80c0b4210a Btrfs: fix NULL pointer dereference in log_dir_items
0, 1 and <0 can be returned by btrfs_next_leaf(), and when <0 is
returned, path->nodes[0] could be NULL, log_dir_items lacks such a
check for <0 and we may run into a null pointer dereference panic.

Fixes: e02119d5a7 ("Btrfs: Add a write ahead tree log to optimize synchronous operations")
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Liu Bo <bo.liu@linux.alibaba.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2018-04-05 19:22:17 +02:00
..
tests btrfs: tests/qgroup: Fix wrong tree backref level 2018-03-31 02:01:05 +02:00
acl.c btrfs: remove stale comments about fs_mutex 2018-03-31 02:01:07 +02:00
async-thread.c
async-thread.h
backref.c btrfs: Validate child tree block's level and first key 2018-03-31 02:01:06 +02:00
backref.h btrfs: add more __cold annotations 2018-03-26 15:09:39 +02:00
btrfs_inode.h btrfs: open code trivial helper btrfs_page_exists_in_range 2018-03-31 01:26:50 +02:00
check-integrity.c btrfs: Remove custom crc32c init code 2018-03-26 15:09:39 +02:00
check-integrity.h
compression.c btrfs: add more __cold annotations 2018-03-26 15:09:39 +02:00
compression.h btrfs: add more __cold annotations 2018-03-26 15:09:39 +02:00
ctree.c btrfs: update barrier in should_cow_block 2018-03-31 02:01:06 +02:00
ctree.h btrfs: qgroup: Use root::qgroup_meta_rsv_* to record qgroup meta reserved space 2018-03-31 02:01:04 +02:00
dedupe.h
delayed-inode.c btrfs: delayed-inode: Use new qgroup meta rsv for delayed inode and item 2018-03-31 02:01:03 +02:00
delayed-inode.h btrfs: add more __cold annotations 2018-03-26 15:09:39 +02:00
delayed-ref.c btrfs: use lockdep_assert_held for spinlocks 2018-03-31 02:01:06 +02:00
delayed-ref.h btrfs: add more __cold annotations 2018-03-26 15:09:39 +02:00
dev-replace.c btrfs: split dev-replace locking helpers for read and write 2018-03-31 02:01:07 +02:00
dev-replace.h btrfs: split dev-replace locking helpers for read and write 2018-03-31 02:01:07 +02:00
dir-item.c btrfs: Remove custom crc32c init code 2018-03-26 15:09:39 +02:00
disk-io.c Btrfs: print error messages when failing to read trees 2018-03-31 02:02:14 +02:00
disk-io.h btrfs: Validate child tree block's level and first key 2018-03-31 02:01:06 +02:00
export.c
export.h
extent-tree.c btrfs: use lockdep_assert_held for mutexes 2018-03-31 02:01:06 +02:00
extent_io.c btrfs: lift errors from add_extent_changeset to the callers 2018-03-31 02:03:25 +02:00
extent_io.h btrfs: remove unused parameters from extent_submit_bio_done_t 2018-03-31 01:26:55 +02:00
extent_map.c btrfs: add more __cold annotations 2018-03-26 15:09:39 +02:00
extent_map.h btrfs: add more __cold annotations 2018-03-26 15:09:39 +02:00
file-item.c
file.c btrfs: qgroup: Use separate meta reservation type for delalloc 2018-03-31 01:41:14 +02:00
free-space-cache.c btrfs: qgroup: Use separate meta reservation type for delalloc 2018-03-31 01:41:14 +02:00
free-space-cache.h
free-space-tree.c btrfs: use reada direction enum instead of constant value in load_free_space_tree 2018-03-26 15:09:37 +02:00
free-space-tree.h
inode-item.c btrfs: Remove custom crc32c init code 2018-03-26 15:09:39 +02:00
inode-map.c btrfs: qgroup: Use separate meta reservation type for delalloc 2018-03-31 01:41:14 +02:00
inode-map.h
inode.c btrfs: qgroup: Use separate meta reservation type for delalloc 2018-03-31 01:41:14 +02:00
ioctl.c btrfs: user proper type for btrfs_mask_flags flags 2018-03-31 02:01:07 +02:00
Kconfig btrfs: Remove custom crc32c init code 2018-03-26 15:09:39 +02:00
locking.c btrfs: Relax memory barrier in btrfs_tree_unlock 2018-03-31 01:26:51 +02:00
locking.h
lzo.c btrfs: Remove unused tot_len var from lzo_decompress 2018-03-31 01:26:57 +02:00
Makefile btrfs: Remove custom crc32c init code 2018-03-26 15:09:39 +02:00
math.h
ordered-data.c btrfs: qgroup: Use separate meta reservation type for delalloc 2018-03-31 01:41:14 +02:00
ordered-data.h btrfs: add more __cold annotations 2018-03-26 15:09:39 +02:00
orphan.c
print-tree.c btrfs: Validate child tree block's level and first key 2018-03-31 02:01:06 +02:00
print-tree.h
props.c btrfs: drop underscores from exported xattr functions 2018-03-26 15:09:41 +02:00
props.h
qgroup.c btrfs: use lockdep_assert_held for spinlocks 2018-03-31 02:01:06 +02:00
qgroup.h btrfs: qgroup: Introduce function to convert META_PREALLOC into META_PERTRANS 2018-03-31 01:41:14 +02:00
raid56.c Btrfs: replace: cache rbio when rebuild data on missing device 2018-03-31 01:41:12 +02:00
raid56.h
rcu-string.h
reada.c btrfs: split dev-replace locking helpers for read and write 2018-03-31 02:01:07 +02:00
ref-verify.c btrfs: Validate child tree block's level and first key 2018-03-31 02:01:06 +02:00
ref-verify.h
relocation.c btrfs: Validate child tree block's level and first key 2018-03-31 02:01:06 +02:00
root-tree.c
scrub.c btrfs: split dev-replace locking helpers for read and write 2018-03-31 02:01:07 +02:00
send.c Btrfs: send: fix typo in TLV_PUT 2018-03-26 15:09:42 +02:00
send.h
struct-funcs.c
super.c btrfs: use RCU in btrfs_show_devname for device list traversal 2018-03-31 02:01:06 +02:00
sysfs.c btrfs: defer adding raid type kobject until after chunk relocation 2018-03-31 01:41:12 +02:00
sysfs.h
transaction.c btrfs: qgroup: Split meta rsv type into meta_prealloc and meta_pertrans 2018-03-31 01:41:14 +02:00
transaction.h btrfs: Remove code referencing unused TRANS_USERSPACE 2018-03-31 01:26:51 +02:00
tree-checker.c btrfs: add more __cold annotations 2018-03-26 15:09:39 +02:00
tree-checker.h btrfs: tree-checker: Replace root parameter with fs_info 2018-03-26 15:09:38 +02:00
tree-defrag.c btrfs: add define for oldest generation 2018-03-31 01:26:50 +02:00
tree-log.c Btrfs: fix NULL pointer dereference in log_dir_items 2018-04-05 19:22:17 +02:00
tree-log.h btrfs: Remove root argument from btrfs_log_dentry_safe 2018-03-26 15:09:42 +02:00
ulist.c
ulist.h
uuid-tree.c btrfs: add define for oldest generation 2018-03-31 01:26:50 +02:00
volumes.c btrfs: split dev-replace locking helpers for read and write 2018-03-31 02:01:07 +02:00
volumes.h btrfs: rename btrfs_close_extra_device to btrfs_free_extra_devids 2018-03-26 15:09:42 +02:00
xattr.c btrfs: adjust return type of btrfs_getxattr 2018-03-26 15:09:41 +02:00
xattr.h btrfs: move btrfs_listxattr prototype to xattr.h 2018-03-26 15:09:41 +02:00
zlib.c
zstd.c