[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250605080436.3764686-1-hyesoo.yu@samsung.com>
Date: Thu, 5 Jun 2025 17:04:30 +0900
From: Hyesoo Yu <hyesoo.yu@...sung.com>
To:
Cc: janghyuck.kim@...sung.com, zhaoyang.huang@...soc.com,
jaewon31.kim@...il.com, david@...hat.com, Hyesoo Yu <hyesoo.yu@...sung.com>,
Andrew Morton <akpm@...ux-foundation.org>, Jason Gunthorpe <jgg@...pe.ca>,
John Hubbard <jhubbard@...dia.com>, Peter Xu <peterx@...hat.com>,
linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: [PATCH v3 0/1] mm: gup: avoid CMA page pinning by retrying
migration
This patch addresses an issue where longterm GUP requests
could inadvertently pin unpinnable pages (such as CMA) when no
migratable folios are found. This regression was introduced by
commit 1aaf8c122918 ("mm: gup: fix infinite loop within __get_longterm_locked").
This patch fixes the logic to return -EAGAIN when unpinnable
pages are detected but no folios could be collected, allowing
migration to be retried instead of incorrectly pinning the page.
This v3 drops the cleanup patch included in v2,
per Andrew Morton's request. It now contains only the regression fix.
The cleanup changes will be proposed separately for the 6.17-rc1.
Hyesoo Yu (1):
mm: gup: avoid CMA page pinning by retrying migration if no migratable
page
mm/gup.c | 28 ++++++++++++++++++++++------
1 file changed, 22 insertions(+), 6 deletions(-)
--
2.49.0
Powered by blists - more mailing lists