]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdkfd: fix double free device pgmap resource
authorPhilip Yang <Philip.Yang@amd.com>
Mon, 26 Apr 2021 18:25:37 +0000 (14:25 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 29 Apr 2021 03:36:04 +0000 (23:36 -0400)
commit2ad57593252d149e03743227e3761e08f3b31ef7
tree09e510743c990c6f0a01649482439a38ba0ed496
parent3037c69d596f359fdb7cf8f42035ae0ffd3efca5
drm/amdkfd: fix double free device pgmap resource

Use devm_memunmap_pages instead of memunmap_pages to release pgmap
and remove pgmap from device action, to avoid double free pgmap when
unloading driver module.

Release device memory region if failed to create device memory pages
structure.

Signed-off-by: Philip Yang <Philip.Yang@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_migrate.c