]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: fix use-after-free when aborting corrupt attr inactivation
authorDarrick J. Wong <darrick.wong@oracle.com>
Sat, 24 Sep 2022 12:56:56 +0000 (18:26 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 28 Sep 2022 09:04:11 +0000 (11:04 +0200)
commit975cba15b71f6cc71e5e7004d72df97760f7f1a3
treec4bb892a367c4e0fd28c9efbb2fb82ba8e3ef79c
parentff65d0a5db9bb1eb24a3a2bbf397c89f9e981e76
xfs: fix use-after-free when aborting corrupt attr inactivation

commit e8d613a892042cd70087a39893cd1a6f1f4a40b7 upstream.

Log the corrupt buffer before we release the buffer.

Fixes: 3f092aea7c1fe ("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>
Acked-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Chandan Babu R <chandan.babu@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/xfs/xfs_attr_inactive.c