summaryrefslogtreecommitdiff
path: root/fs/nls/Makefile
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2020-11-14 09:59:22 -0800
committerDarrick J. Wong <darrick.wong@oracle.com>2020-11-18 09:23:51 -0800
commit27c14b5daa82861220d6fa6e27b51f05f21ffaa7 (patch)
tree83616f4fd6999b0444ba6d46284d303d45f1751a /fs/nls/Makefile
parentada49d64fb3538144192181db05de17e2ffc3551 (diff)
xfs: ensure inobt record walks always make forward progress
The aim of the inode btree record iterator function is to call a callback on every record in the btree. To avoid having to tear down and recreate the inode btree cursor around every callback, it caches a certain number of records in a memory buffer. After each batch of callback invocations, we have to perform a btree lookup to find the next record after where we left off. However, if the keys of the inode btree are corrupt, the lookup might put us in the wrong part of the inode btree, causing the walk function to loop forever. Therefore, we add extra cursor tracking to make sure that we never go backwards neither when performing the lookup nor when jumping to the next inobt record. This also fixes an off by one error where upon resume the lookup should have been for the inode /after/ the point at which we stopped. Found by fuzzing xfs/460 with keys[2].startino = ones causing bulkstat and quotacheck to hang. Fixes: a211432c27ff ("xfs: create simplified inode walk function") Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Chandan Babu R <chandanrlinux@gmail.com>
Diffstat (limited to 'fs/nls/Makefile')
0 files changed, 0 insertions, 0 deletions