aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/libxfs/xfs_exchmaps.c
diff options
context:
space:
mode:
authorDarrick J. Wong <[email protected]>2024-04-15 21:54:36 +0000
committerDarrick J. Wong <[email protected]>2024-04-15 21:58:51 +0000
commitf4887fbc41dcb1560ec5da982ac7c6ad04b71de5 (patch)
treedda77034fb9f6b655c77bd9449626114779d5f75 /fs/xfs/libxfs/xfs_exchmaps.c
parentxfs: reduce indenting in xfs_attr_node_list (diff)
downloadkernel-f4887fbc41dcb1560ec5da982ac7c6ad04b71de5.tar.gz
kernel-f4887fbc41dcb1560ec5da982ac7c6ad04b71de5.zip
xfs: validate attr leaf buffer owners
Create a leaf block header checking function to validate the owner field of xattr leaf blocks. Signed-off-by: Darrick J. Wong <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]>
Diffstat (limited to 'fs/xfs/libxfs/xfs_exchmaps.c')
-rw-r--r--fs/xfs/libxfs/xfs_exchmaps.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/xfs/libxfs/xfs_exchmaps.c b/fs/xfs/libxfs/xfs_exchmaps.c
index 8d28e8cce5e9..9c9cf2e998b2 100644
--- a/fs/xfs/libxfs/xfs_exchmaps.c
+++ b/fs/xfs/libxfs/xfs_exchmaps.c
@@ -438,7 +438,8 @@ xfs_exchmaps_attr_to_sf(
if (!xfs_attr_is_leaf(xmi->xmi_ip2))
return 0;
- error = xfs_attr3_leaf_read(tp, xmi->xmi_ip2, 0, &bp);
+ error = xfs_attr3_leaf_read(tp, xmi->xmi_ip2, xmi->xmi_ip2->i_ino, 0,
+ &bp);
if (error)
return error;