ocfs2: consolidate extent list validation into block read callbacks
Status from this message: [merged mm-nonmm-stable] ocfs2-remove-redundant-l_next_free_rec-check-in-__ocfs2_find_path.patch removed from -mm tree
Get series with b4
b4 am [email protected]Versions newest first
Patches in v1 All 4 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | ocfs2: validate dx_root extent list fields during block readfs/ | +25 | 1 reply | Applied |
| 2/4 | ocfs2: remove empty extent list check in ocfs2_dx_dir_lookup_rec()fs/ | +3 | 1 reply | Applied |
| 3/4 | ocfs2: validate extent block list fields during block readfs/ | +22 | 1 reply | Applied |
| 4/4 | ocfs2: remove redundant l_next_free_rec check in __ocfs2_find_path()fs/ | +0 | 1 reply | Applied |
Reviews trailers per patch
All 4 patches have a Reviewed-by or Acked-by.
| Patch | Heming Zhao |
|---|---|
| 1/4 | R-b |
| 2/4 | R-b |
| 3/4 | R-b |
| 4/4 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/4] ocfs2: consolidate extent list validation into block read callbacks
ocfs2 validates extent list fields (l_count, l_next_free_rec) at various points during extent tree traversal. This is fragile because each caller must remember to check for corrupted on-disk data before using it.
This series moves those checks into the block read validation callbacks (ocfs2_validate_dx_root and ocfs2_validate_extent_block), so corrupted fields are caught early at block read time. Redundant post-read checks are then removed.
Patch 1-2 handle the dx_root extent list:
- Move l_count and l_next_free_rec validation into ocfs2_validate_dx_root(), skipping inline dx roots.
- Remove the now-redundant l_next_free_rec == 0 check in ocfs2_dx_dir_lookup_rec() and rework the error message to avoid a potential NULL pointer dereference of rec.
Patch 3-4 handle extent blocks:
- Add l_count and l_next_free_rec validation to ocfs2_validate_extent_block().
- Remove the duplicate l_next_free_rec > l_count check in
__ocfs2_find_path().
Joseph Qi (4):
ocfs2: validate dx_root extent list fields during block read
ocfs2: remove empty extent list check in ocfs2_dx_dir_lookup_rec()
ocfs2: validate extent block list fields during block read
ocfs2: remove redundant l_next_free_rec check in __ocfs2_find_path()
fs/ocfs2/alloc.c | 35 +++++++++++++++++++++------------- fs/ocfs2/dir.c | 49 +++++++++++++++++++++++++++--------------------- 2 files changed, 50 insertions(+), 34 deletions(-)
Signature · 1 line
2.39.3