mm/pagewalk: fix stale walk->action escaping walk_pmd_range()
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest2 patches 11 repliesIn review 1 of 2 applied
- v11 patch 4 repliesSuperseded
Changes in v2 from the cover letter
- 1/2: reworked the changelog along the lines Lorenzo suggested and said how the bug was found; the fix itself is unchanged (Lorenzo)
- 2/2: new, races smaps against MADV_DONTNEED and checks that Rss does not come out twice as large as what was faulted in (Lorenzo)
- v1: https://lore.kernel.org/r/anmdrYGVqM-U4vlo@v4bel
Patches in v2 1 of 2 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | mm/pagewalk: fix stale walk->action escaping walk_pmd_range()mm/ | +2 | 5 replies | Applied |
| 2/2 | selftests/mm: add stale walk->action race testtools/ tools/ tools/ +3 more | +148 | 6 replies |
Reviews trailers per patch
1 of 2 patches has a Reviewed-by or Acked-by.
| Patch | Lorenzo Stoakes (ARM) | David Hildenbrand (Arm) |
|---|---|---|
| 1/2 | R-b | A-b |
| 2/2 |
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/pagewalk: fix stale walk->action escaping walk_pmd_range()
walk_pmd_range() could return with walk->action left at ACTION_AGAIN, which causes walk_pud_range() to retry the PUD walk and invoke the walk callbacks twice over the same range.
Patch 1 is the fix. Patch 2 adds a regression test for it.
Changes in v2:
- 1/2: reworked the changelog along the lines Lorenzo suggested and said how the bug was found; the fix itself is unchanged (Lorenzo)
- 2/2: new, races smaps against MADV_DONTNEED and checks that Rss does not come out twice as large as what was faulted in (Lorenzo)
- v1: https://lore.kernel.org/r/anmdrYGVqM-U4vlo@v4bel
Hyunwoo Kim (2):
mm/pagewalk: fix stale walk->action escaping walk_pmd_range() selftests/mm: add stale walk->action race test
mm/pagewalk.c | 6 +- tools/testing/selftests/mm/.gitignore | 1 + tools/testing/selftests/mm/Makefile | 2 + tools/testing/selftests/mm/ksft_pagewalk.sh | 4 + .../testing/selftests/mm/pagewalk_race_test.c | 138 ++++++++++++++++++ tools/testing/selftests/mm/run_vmtests.sh | 2 + tools/testing/selftests/mm/vm_util.h | 1 + 7 files changed, 150 insertions(+), 4 deletions(-) create mode 100755 tools/testing/selftests/mm/ksft_pagewalk.sh create mode 100644 tools/testing/selftests/mm/pagewalk_race_test.c
Signature · 1 line
2.43.0