xfs: detect self referencing btree sibling pointers
authorDave Chinner <dchinner@redhat.com>
Tue, 14 Feb 2023 21:25:27 +0000 (13:25 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Feb 2023 11:57:03 +0000 (12:57 +0100)
commit0cc9f9cc8d91d382f8e8989196fbc39fe1ed3010
tree922587a3b93b1bae42b3ceee198608d35a29c4fe
parent4e96f5ace9ace42aaf58d83a7d9e9ecb09bf8d70
xfs: detect self referencing btree sibling pointers

[ Upstream commit dc04db2aa7c9307e740d6d0e173085301c173b1a ]

To catch the obvious graph cycle problem and hence potential endless
looping.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Leah Rumancik <leah.rumancik@gmail.com>
Acked-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/xfs/libxfs/xfs_btree.c