mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-04 00:15:49 -04:00
nouveau: Fix migrate_to_ram() for faulting page
Commit16ce101db8("mm/memory.c: fix race when faulting a device private page") changed the migrate_to_ram() callback to take a reference on the device page to ensure it can't be freed while handling the fault. Unfortunately the corresponding update to Nouveau to accommodate this change was inadvertently dropped from that patch causing GPU to CPU migration to fail so add it here. Signed-off-by: Alistair Popple <apopple@nvidia.com> Fixes:16ce101db8("mm/memory.c: fix race when faulting a device private page") Cc: John Hubbard <jhubbard@nvidia.com> Cc: Ralph Campbell <rcampbell@nvidia.com> Cc: Lyude Paul <lyude@redhat.com> Cc: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com> Signed-off-by: Lyude Paul <lyude@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20221019122934.866205-1-apopple@nvidia.com
This commit is contained in:
committed by
Lyude Paul
parent
3facae0649
commit
1beca7f147
@@ -176,6 +176,7 @@ static vm_fault_t nouveau_dmem_migrate_to_ram(struct vm_fault *vmf)
|
||||
.src = &src,
|
||||
.dst = &dst,
|
||||
.pgmap_owner = drm->dev,
|
||||
.fault_page = vmf->page,
|
||||
.flags = MIGRATE_VMA_SELECT_DEVICE_PRIVATE,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user