]> git.baikalelectronics.ru Git - kernel.git/commit
drm/nouveau/nouveau: fix page fault on device private memory
authorRalph Campbell <rcampbell@nvidia.com>
Fri, 26 Jun 2020 21:03:37 +0000 (14:03 -0700)
committerBen Skeggs <bskeggs@redhat.com>
Wed, 8 Jul 2020 03:30:42 +0000 (13:30 +1000)
commit402ed992e8bba0e813c00cfa4f2ca2a3b18ffdfe
treeb70cc42bd6032679c783ad7bad0bc6244a1d1ba3
parentc846fb92285f0944719b5760fdfae6deebe80068
drm/nouveau/nouveau: fix page fault on device private memory

If system memory is migrated to device private memory and no GPU MMU
page table entry exists, the GPU will fault and call hmm_range_fault()
to get the PFN for the page. Since the .dev_private_owner pointer in
struct hmm_range is not set, hmm_range_fault returns an error which
results in the GPU program stopping with a fatal fault.
Fix this by setting .dev_private_owner appropriately.

Fixes: 58d609aa32d0 ("mm/hmm: check the device private page owner in hmm_range_fault()")
Cc: stable@vger.kernel.org
Signed-off-by: Ralph Campbell <rcampbell@nvidia.com>
Reviewed-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nouveau_svm.c