On Sun, Mar 07, 2021 at 12:36:38PM -0800, Darrick J. Wong wrote: > From: Darrick J. Wong <djwong@xxxxxxxxxx> > > When we're servicing an INUMBERS or BULKSTAT request or running > quotacheck, grab an empty transaction so that we can use its inherent > recursive buffer locking abilities to detect inode btree cycles without > hitting ABBA buffer deadlocks. > > Found by fuzzing an inode btree pointer to introduce a cycle into the > tree (xfs/365). > > Signed-off-by: Darrick J. Wong <djwong@xxxxxxxxxx> > --- > v2.1: actually pass tp in the bulkstat_single case > --- > fs/xfs/xfs_itable.c | 42 +++++++++++++++++++++++++++++++++++++----- > fs/xfs/xfs_iwalk.c | 32 +++++++++++++++++++++++++++----- > 2 files changed, 64 insertions(+), 10 deletions(-) Looks ok, but I can't help but wonder if this case should flag corruption if lock recursion does actually occur... Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx> -- Dave Chinner david@xxxxxxxxxxxxx