diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2018-06-04 20:23:54 +0300 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2018-06-05 04:25:05 +0300 |
commit | 2551a53053de52993be8752731f084fad3cfc4d8 (patch) | |
tree | 1956959bc2647d950a2ba4325ead3baa3271f7b8 /fs/xfs/libxfs/xfs_btree.c | |
parent | 85ae01098c1a6a8e3ce908f8808f2d8f8effdbe3 (diff) | |
download | linux-2551a53053de52993be8752731f084fad3cfc4d8.tar.xz |
xfs: explicitly pass buffer size to xfs_corruption_error
Explicitly pass the buffer length to xfs_corruption_error() instead of
assuming XFS_CORRUPTION_DUMP_LEN so that we avoid dumping off the end
of the buffer.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Diffstat (limited to 'fs/xfs/libxfs/xfs_btree.c')
-rw-r--r-- | fs/xfs/libxfs/xfs_btree.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/xfs/libxfs/xfs_btree.c b/fs/xfs/libxfs/xfs_btree.c index 4f83d7949a21..6b589e4f703e 100644 --- a/fs/xfs/libxfs/xfs_btree.c +++ b/fs/xfs/libxfs/xfs_btree.c @@ -1932,7 +1932,8 @@ xfs_btree_lookup( if (level != 0 || cur->bc_nlevels != 1) { XFS_CORRUPTION_ERROR(__func__, XFS_ERRLEVEL_LOW, - cur->bc_mp, block); + cur->bc_mp, block, + sizeof(*block)); return -EFSCORRUPTED; } |