summaryrefslogtreecommitdiff
path: root/ioexact.c
AgeCommit message (Expand)AuthorFilesLines
2013-06-17ioexact: make mayexit a boolDaniel Borkmann1-2/+5
2013-06-04xio: add ioexact operationsDaniel Borkmann1-0/+53
le summary='commit info' class='commit-info'> authorAmir Goldstein <amir73il@gmail.com>2017-01-17 11:41:41 -0800 committerDarrick J. Wong <darrick.wong@oracle.com>2017-01-17 11:41:41 -0800 commit3c6f46eacd876bd723a9bad3c6882714c052fd8e (patch) tree4ea7023de1e62d8df75e5af72c0485d5ef61c175 parentbf46ecc3d8cca05f2907cf482755c42c2b11a79d (diff)
xfs: sanity check directory inode di_size
This changes fixes an assertion hit when fuzzing on-disk i_mode values. The easy case to fix is when changing an empty file i_mode to S_IFDIR. In this case, xfs_dinode_verify() detects an illegal zero size for directory and fails to load the inode structure from disk. For the case of non empty file whose i_mode is changed to S_IFDIR, the ASSERT() statement in xfs_dir2_isblock() is replaced with return -EFSCORRUPTED, to avoid interacting with corrupted jusk also when XFS_DEBUG is disabled. Suggested-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Amir Goldstein <amir73il@gmail.com> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat