mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-02 07:29:12 -04:00
xfs: fix use-after-free when aborting corrupt attr inactivation
Log the corrupt buffer before we release the buffer.
Fixes: a5155b870d ("xfs: always log corruption errors")
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
@@ -145,8 +145,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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user