]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdkfd: Fix incorrect use of process->mm
authorFelix Kuehling <Felix.Kuehling@amd.com>
Wed, 22 Aug 2018 19:28:44 +0000 (15:28 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 9 Oct 2018 22:06:19 +0000 (17:06 -0500)
commite6b1379977a16b9a4822f789476807c398fe9d6a
treeccfa9840faeca5933b9294a73f64df70f7e719b8
parenta9ca2ec9cf6cdb5d1156ba32821cfeee99da7213
drm/amdkfd: Fix incorrect use of process->mm

This mm_struct pointer should never be dereferenced. If running in
a user thread, just use current->mm. If running in a kernel worker
use get_task_mm to get a safe reference to the mm_struct.

Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c