xfs: check log iovec size to make sure it's plausibly a buffer log format
authorDarrick J. Wong <darrick.wong@oracle.com>
Tue, 14 Jan 2020 00:33:46 +0000 (16:33 -0800)
committerDarrick J. Wong <darrick.wong@oracle.com>
Thu, 16 Jan 2020 16:07:24 +0000 (08:07 -0800)
commit8a6453a89dc10269adb1fc0cd0ceba928d557c21
tree9436eaf0077cc793ca8ebc34405d36633febfdae
parentb7df5e92055c69666e3c82f31f193120d98f04e3
xfs: check log iovec size to make sure it's plausibly a buffer log format

When log recovery is processing buffer log items, we should check that
the incoming iovec actually describes a region of memory large enough to
contain the log format and the dirty map.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fs/xfs/xfs_buf_item.c
fs/xfs/xfs_buf_item.h
fs/xfs/xfs_log_recover.c