diff options
| author | Apurv Mishra <Apurv.Mishra@amd.com> | 2026-10-19 20:18:39 -0400 |
|---|---|---|
| committer | Alex Deucher <alexander.deucher@amd.com> | 2026-11-11 15:53:55 -0500 |
| commit | 8cd5429d429eced2441173b3306f7e137a4dc31f (patch) | |
| tree | f8d837c4c48c7b49572ed347f69de2e1ad998866 /tools/perf/scripts/python | |
| parent | 491aa2b083e18ef11d34f776bcb0e396a84f47e4 (diff) | |
drm/amdkfd: Don't reuse a VRAM page that is still referenced
In svm_migrate_copy_to_vram(), skip VRAM pages with a non-zero refcount
and leave those pages in system memory for this migration.
When an svm_bo is reused, a VRAM page can still be held by an in-flight
CPU fault (do_swap_page -> svm_migrate_to_ram). Migrating to VRAM then
re-initializes the page via zone_device_page_init(), resetting its
refcount. The fault's late put_page() frees the page mid-migration, so
migrate_vma_finalize() never restores that PTE. It is left pointing at a
freed system page and hmm_range_fault() hits BUG_ON in
pfn_swap_entry_to_page() (swapops.h).
Signed-off-by: Apurv Mishra <Apurv.Mishra@amd.com>
Reviewed-by: Philip Yang <Philip.Yang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 1f19aa7acacbce35584dd8f75a30880096fda6a4)
Cc: stable@vger.kernel.org
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
