]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: check owner of dir3 data blocks
authorDarrick J. Wong <darrick.wong@oracle.com>
Wed, 26 Oct 2022 06:28:24 +0000 (11:58 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 29 Oct 2022 08:20:33 +0000 (10:20 +0200)
commitc65969b7320e540275a00f2bc3627903ea540e33
tree53f46a5b777e7beab505dfc04f4f7bf574ec071a
parent588c8506c6c93901fd9d2a155b3d4a031aab2ee0
xfs: check owner of dir3 data blocks

commit 745191f2f73c5a696956593671376b1fb987ae7b upstream.

[Slightly edit xfs_dir3_data_read() to work with existing mapped_bno argument instead
of flag values introduced in later kernels]

Check the owner field of dir3 data block headers.  If it's corrupt,
release the buffer and return EFSCORRUPTED.  All callers handle this
properly.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
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/libxfs/xfs_dir2_data.c