mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 15:11:48 -04:00
drm/amdkfd: Fix error codes in kfd_get_process
Return ERR_PTR(-EINVAL) if kfd_get_process fails to find the process. This fixes kernel oopses when a child process calls KFD ioctls with a file descriptor inherited from the parent process. Signed-off-by: Wei Lu <wei.lu2@amd.com> Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com> Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com> Acked-by: Christian König <christian.koenig@amd.com> Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
This commit is contained in:
parent
a60d811b2b
commit
e47cb828eb
1 changed files with 2 additions and 0 deletions
|
|
@ -244,6 +244,8 @@ struct kfd_process *kfd_get_process(const struct task_struct *thread)
|
|||
return ERR_PTR(-EINVAL);
|
||||
|
||||
process = find_process(thread);
|
||||
if (!process)
|
||||
return ERR_PTR(-EINVAL);
|
||||
|
||||
return process;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue