]> git.apps.os.sepia.ceph.com Git - xfsprogs-dev.git/commit
xfs: attr fork iext must be loaded before calling xfs_attr_is_leaf
authorDarrick J. Wong <djwong@kernel.org>
Mon, 29 Jul 2024 23:22:44 +0000 (16:22 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Tue, 30 Jul 2024 00:01:01 +0000 (17:01 -0700)
commitf9bd947e116fffa4e1af468e8423971c15ac0b38
tree52666f48c1cfff6d8acdf799162d10499389420e
parentf6fbc46862cc9a6e41968a8ff5c1c72923984c08
xfs: attr fork iext must be loaded before calling xfs_attr_is_leaf

Source kernel commit: ef80de940a6344da1d4f12c948a0ad4d6ff6e841

Christoph noticed that the xfs_attr_is_leaf in xfs_attr_get_ilocked can
access the incore extent tree of the attr fork, but nothing in the
xfs_attr_get path guarantees that the incore tree is actually loaded.

Most of the time it is, but seeing as xfs_attr_is_leaf ignores the
return value of xfs_iext_get_extent I guess we've been making choices
based on random stack contents and nobody's complained?

Reported-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
libxfs/xfs_attr.c