Skip to content

Commit 97061d4

Browse files
apopple-nvidiaakpm00
authored andcommitted
nouveau: fix migrate_to_ram() for faulting page
Commit 16ce101 ("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. Link: https://lkml.kernel.org/r/[email protected] Fixes: 16ce101 ("mm/memory.c: fix race when faulting a device private page") Signed-off-by: Alistair Popple <[email protected]> Cc: John Hubbard <[email protected]> Cc: Ralph Campbell <[email protected]> Cc: Lyude Paul <[email protected]> Cc: Ben Skeggs <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 71e2d66 commit 97061d4

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/gpu/drm/nouveau/nouveau_dmem.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ static vm_fault_t nouveau_dmem_migrate_to_ram(struct vm_fault *vmf)
176176
.src = &src,
177177
.dst = &dst,
178178
.pgmap_owner = drm->dev,
179+
.fault_page = vmf->page,
179180
.flags = MIGRATE_VMA_SELECT_DEVICE_PRIVATE,
180181
};
181182

0 commit comments

Comments
 (0)