btrfs: Verify dir_item in replay_xattr_deletes
authorSu Yue <suy.fnst@cn.fujitsu.com>
Tue, 6 Jun 2017 09:57:03 +0000 (17:57 +0800)
committerDavid Sterba <dsterba@suse.com>
Wed, 21 Jun 2017 17:16:04 +0000 (19:16 +0200)
commit8ee8c2d62d5f9e7d1e592426d3d0b941df29f688
tree5026f6be37ee695402547dbb5d645b753c09750e
parent26a836cec2ea38329ddf3f049c78e9b94e500670
btrfs: Verify dir_item in replay_xattr_deletes

replay_xattr_deletes calls btrfs_search_slot to get buffer and reads
name.

Call verify_dir_item to check name_len in replay_xattr_deletes to avoid
reading out of boundary.

Signed-off-by: Su Yue <suy.fnst@cn.fujitsu.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/tree-log.c