mm/swap: enhance swap cluster allocation checks
Get series with b4
b4 am [email protected]Versions newest first
- v2 Latest2 patches 3 repliesIn review
Changes in v2 from the cover letter
According to the comments of YoungJun Park, Kairui Song and Chris Li, change acquire locks in swap_reclaim_work() to adds a VM_WARN_ON in isolate_lock_cluster().
According to the comments of YoungJun Park, add code in patch 2 to Change the order of lockdep_assert_held() to match the actual lock acquisition order.
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | mm/swap: Add VM_WARN_ON to isolate_lock_cluster()mm/ | +3 | 2 replies | |
| 2/2 | mm/swap: Add lockdep for si->global_cluster_lock in swap_cluster_alloc_table()mm/ | +3 | 1 reply |
Reviews trailers per patch
1 of 2 patches has a Reviewed-by or Acked-by.
| Patch | Youngjun Park |
|---|---|
| 1/2 | |
| 2/2 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v2 0/2] mm/swap: enhance swap cluster allocation checks
From: Hui Zhu <[email protected]>
This series enhances safety and debugging for swap cluster allocation paths in mm/swapfile.c.
Patch 1 adds a VM_WARN_ON in isolate_lock_cluster() to verify that full clusters (which should already have allocated tables) are not processed by swap_cluster_alloc_table().
Patch 2 adds lockdep_assert_held for si->global_cluster_lock on non-SSD devices and adjusts the assertion order to match the actual lock acquisition sequence.
Changelog:
v2:
According to the comments of YoungJun Park, Kairui Song and Chris Li, change acquire locks in swap_reclaim_work() to adds a VM_WARN_ON in isolate_lock_cluster().
According to the comments of YoungJun Park, add code in patch 2 to Change the order of lockdep_assert_held() to match the actual lock acquisition order.
Hui Zhu (2):
mm/swap: Add VM_WARN_ON to isolate_lock_cluster() mm/swap: Add lockdep for si->global_cluster_lock in
swap_cluster_alloc_table()
mm/swapfile.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
Signature · 1 line
2.43.0