xfs: sanity check inode di_mode
authorAmir Goldstein <amir73il@gmail.com>
Tue, 17 Jan 2017 19:41:44 +0000 (11:41 -0800)
committerDarrick J. Wong <darrick.wong@oracle.com>
Tue, 17 Jan 2017 19:42:22 +0000 (11:42 -0800)
commita324cbf10a3c67aaa10c9f47f7b5801562925bc2
tree34d10d7b82bf5e68df6b59c77ffa48d4624fa80d
parentfab8eef86c814c3dd46bc5d760b6e4a53d5fc5a6
xfs: sanity check inode di_mode

Check for invalid file type in xfs_dinode_verify()
and fail to load the inode structure from disk.

Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
fs/xfs/libxfs/xfs_inode_buf.c