summaryrefslogtreecommitdiff
path: root/include/linux/fpga/fpga-mgr.h
diff options
context:
space:
mode:
authorAmir Goldstein <amir73il@gmail.com>2017-02-02 08:55:59 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-02-04 09:47:11 +0100
commite5325fcf70b1cd2c45503b854fde3f1bd44216da (patch)
treebf257857d39f5a0b6ba3fd11cdbc17e7d0ec7cbe /include/linux/fpga/fpga-mgr.h
parent624e54b5aff15c6d49974f404c5cef5ce7f89cd0 (diff)
xfs: sanity check directory inode di_size
commit 3c6f46eacd876bd723a9bad3c6882714c052fd8e upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/fpga/fpga-mgr.h')
0 files changed, 0 insertions, 0 deletions