aboutsummaryrefslogtreecommitdiffstats
path: root/lib/test_xarray.c
diff options
context:
space:
mode:
authorZhaoyang Huang <[email protected]>2025-01-21 02:01:59 +0000
committerAndrew Morton <[email protected]>2025-02-01 11:53:27 +0000
commit1aaf8c122918aa8897605a9aa1e8ed6600d6f930 (patch)
tree8590876a0f92e4c45ef7a7a9b32b3b3faaf38e31 /lib/test_xarray.c
parentmm, swap: fix reclaim offset calculation error during allocation (diff)
downloadkernel-1aaf8c122918aa8897605a9aa1e8ed6600d6f930.tar.gz
kernel-1aaf8c122918aa8897605a9aa1e8ed6600d6f930.zip
mm: gup: fix infinite loop within __get_longterm_locked
We can run into an infinite loop in __get_longterm_locked() when collect_longterm_unpinnable_folios() finds only folios that are isolated from the LRU or were never added to the LRU. This can happen when all folios to be pinned are never added to the LRU, for example when vm_ops->fault allocated pages using cma_alloc() and never added them to the LRU. Fix it by simply taking a look at the list in the single caller, to see if anything was added. [[email protected]: move definition of local] Link: https://lkml.kernel.org/r/[email protected] Link: https://lkml.kernel.org/r/[email protected] Fixes: 67e139b02d99 ("mm/gup.c: refactor check_and_migrate_movable_pages()") Signed-off-by: Zhaoyang Huang <[email protected]> Reviewed-by: John Hubbard <[email protected]> Reviewed-by: David Hildenbrand <[email protected]> Suggested-by: David Hildenbrand <[email protected]> Acked-by: David Hildenbrand <[email protected]> Cc: Aijun Sun <[email protected]> Cc: Alistair Popple <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'lib/test_xarray.c')
0 files changed, 0 insertions, 0 deletions