Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 26e7c965 authored by Darrick J. Wong's avatar Darrick J. Wong Committed by Greg Kroah-Hartman
Browse files

xfs: fix use-after-free when aborting corrupt attr inactivation



commit 496b9bcd62b0b3a160be61e3265a086f97adcbd3 upstream.

Log the corrupt buffer before we release the buffer.

Fixes: a5155b870d687 ("xfs: always log corruption errors")
Signed-off-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: default avatarDave Chinner <dchinner@redhat.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Acked-by: default avatarDarrick J. Wong <djwong@kernel.org>
Signed-off-by: default avatarChandan Babu R <chandan.babu@oracle.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8b3c9eb1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -209,8 +209,8 @@ xfs_attr3_node_inactive(
	 * Since this code is recursive (gasp!) we must protect ourselves.
	 */
	if (level > XFS_DA_NODE_MAXDEPTH) {
		xfs_trans_brelse(*trans, bp);	/* no locks for later trans */
		xfs_buf_corruption_error(bp);
		xfs_trans_brelse(*trans, bp);	/* no locks for later trans */
		return -EFSCORRUPTED;
	}