]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: validate xattr name earlier in recovery
authorDarrick J. Wong <djwong@kernel.org>
Fri, 20 May 2022 04:42:36 +0000 (14:42 +1000)
committerDave Chinner <david@fromorbit.com>
Fri, 20 May 2022 04:42:36 +0000 (14:42 +1000)
commitbc3f09572b3c79c1a622af448f79a785e983079e
treea9c719770d9f06637a9c8da10adff80b1c15661f
parent9ecce487e53f0fdffc71d40fc3f035092aa6f406
xfs: validate xattr name earlier in recovery

When we're validating a recovered xattr log item during log recovery, we
should check the name before starting to allocate resources.  This isn't
strictly necessary on its own, but it means that we won't bother with
huge memory allocations during recovery if the attr name is garbage,
which will simplify the changes in the next patch.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Allison Henderson <allison.henderson@oracle.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
fs/xfs/xfs_attr_item.c