OSDN Git Service

drm/amdkfd: Fix incorrect use of process->mm
authorFelix Kuehling <Felix.Kuehling@amd.com>
Tue, 2 Oct 2018 22:41:12 +0000 (18:41 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 4 Oct 2018 15:37:25 +0000 (11:37 -0400)
commit11b29c9e25788d0afb2ddb67bcd89424bd25f2f7
tree12b50c02a89f402ac4f77a9fbd20c32056a56d0c
parent987bf116445db5d63a5c2ed94c4479687d9c9973
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.

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