]> www.infradead.org Git - users/dwmw2/linux.git/commit
drm/amdkfd: Fix error codes in kfd_get_process
authorWei Lu <wei.lu2@amd.com>
Thu, 12 Jul 2018 02:32:47 +0000 (22:32 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Sep 2018 06:39:41 +0000 (08:39 +0200)
commit1950f800faa1981d48535322ee68e9131d4ddff4
tree4a12c68983804ed2a8bae6563ad4723c4b90ab84
parent4841f051b32c4ff0029dd84bdd9456b8b09dd1be
drm/amdkfd: Fix error codes in kfd_get_process

[ Upstream commit e47cb828eb3fca3e8999a0b9aa053dda18552071 ]

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>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/amd/amdkfd/kfd_process.c