mirror of
https://github.com/torvalds/linux.git
synced 2026-05-31 10:33:41 +02:00
xfs: xattr scrub should ensure one namespace bit per name
Check that each extended attribute exists in only one namespace. Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Dave Chinner <dchinner@redhat.com>
This commit is contained in:
parent
1c1646afc9
commit
c12ad41468
|
|
@ -128,10 +128,16 @@ xchk_xattr_listent(
|
|||
return;
|
||||
}
|
||||
|
||||
/* Only one namespace bit allowed. */
|
||||
if (hweight32(flags & XFS_ATTR_NSP_ONDISK_MASK) > 1) {
|
||||
xchk_fblock_set_corrupt(sx->sc, XFS_ATTR_FORK, args.blkno);
|
||||
goto fail_xref;
|
||||
}
|
||||
|
||||
/* Does this name make sense? */
|
||||
if (!xfs_attr_namecheck(name, namelen)) {
|
||||
xchk_fblock_set_corrupt(sx->sc, XFS_ATTR_FORK, args.blkno);
|
||||
return;
|
||||
goto fail_xref;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user