Skip to content

fix follow_page related issues

Haiyue Wang linux-mm lkml 6 versions – Applied

Status from this message: [merged mm-stable] mm-fix-the-handling-non-lru-pages-returned-by-follow_page.patch removed from -mm tree

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v7 Latest2 patches 4 repliesApplied 2/2
  2. v62 patches 20 repliesSuperseded
  3. v52 patches 6 repliesSuperseded
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v42 patches6 repliesSuperseded
v32 patches6 repliesSuperseded
v23 patches4 repliesSuperseded

Patches in v7 All 2 applied

#Subject and filesSizeRepliesApplied
1/2mm: migration: fix the FOLL_GET failure on following huge pagemm/migrate.c+8 -24 repliesApplied
2/2mm: fix the handling Non-LRU pages returned by follow_pagemm/huge_memory.c mm/ksm.c mm/migrate.c+22 -110 repliesApplied

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchHuang, YingBaolin WangMiaohe LinFelix KuehlingAlistair PoppleDavid Hildenbrand
1/2R-b R-b R-b
2/2R-b R-b R-b R-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 6 reviewers.

Read the v7 thread

Cover letter [PATCH v7 0/2] fix follow_page related issues

v7: Drop the zone device page check for transparent page.

v6: Simplify the multiple layers of conditionals for if {}

- if (page) {
- err = !is_zone_device_page(page) ? page_to_nid(page)
- : -ENOENT;
- if (foll_flags & FOLL_GET)
- put_page(page);
- } else {
- err = -ENOENT;

-               }
+               err = -ENOENT;
+               if (!page)

+ goto set_status;
+
+ if (!is_zone_device_page(page))
+ err = page_to_nid(page);
+
+ if (foll_flags & FOLL_GET)
+ put_page(page);

v5: reword the commit message for FOLL_GET with more information.

v4: add '()' for the function for readability.
add more words about the Non-LRU pages fix in commit message.

v3: Merge the fix for handling Non-LRU pages into one patch.
Drop the break_ksm zone device page check.

v2: Add the Non-LRU pages fix with two patches, so that
'mm: migration: fix the FOLL_GET' can be applied directly on linux-5.19 stable branch.

Haiyue Wang (2):
mm: migration: fix the FOLL_GET failure on following huge page
mm: fix the handling Non-LRU pages returned by follow_page

 mm/huge_memory.c |  2 +-
 mm/ksm.c         | 12 +++++++++---
 mm/migrate.c     | 23 +++++++++++++++++------
 3 files changed, 27 insertions(+), 10 deletions(-)
Signature · 1 line
2.37.2