]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: check _alloc_read_agf buffer pointer before using
authorDarrick J. Wong <darrick.wong@oracle.com>
Mon, 17 Jul 2017 21:30:57 +0000 (14:30 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Thu, 20 Jul 2017 21:42:33 +0000 (14:42 -0700)
commitae4a87f84eba78691391cb5984d8f9b6433fe620
tree65bd2a8994345c5b793541206f54a15bf56903a9
parentb3d2692e1a606b3e24f55988e24df975054e6aae
xfs: check _alloc_read_agf buffer pointer before using

In some circumstances, _alloc_read_agf can return an error code of zero
but also a null AGF buffer pointer.  Check for this and jump out.

Fixes-coverity-id: 1415250
Fixes-coverity-id: 1415320
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
fs/xfs/libxfs/xfs_refcount.c
fs/xfs/xfs_reflink.c