]> git.baikalelectronics.ru Git - kernel.git/commit
nouveau: fix migrate_to_ram() for faulting page
authorAlistair Popple <apopple@nvidia.com>
Wed, 19 Oct 2022 12:29:34 +0000 (23:29 +1100)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 21 Oct 2022 04:27:24 +0000 (21:27 -0700)
commitd8287685d43cc6a96d13fb77a5638450e1ec58bb
tree6192201818f25a50a4d262e80e500027da73db9b
parent43361c979a931f3f08a13bdc1ab1a8da0fe9023c
nouveau: fix migrate_to_ram() for faulting page

Commit 0d9d166cc4b1 ("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/20221019122934.866205-1-apopple@nvidia.com
Fixes: 0d9d166cc4b1 ("mm/memory.c: fix race when faulting a device private page")
Signed-off-by: Alistair Popple <apopple@nvidia.com>
Cc: John Hubbard <jhubbard@nvidia.com>
Cc: Ralph Campbell <rcampbell@nvidia.com>
Cc: Lyude Paul <lyude@redhat.com>
Cc: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/gpu/drm/nouveau/nouveau_dmem.c