Skip to content

Commit b312b2b

Browse files
Dan Carpenterogabbay
authored andcommitted
drm/amdkfd: NULL dereference involving create_process()
We accidentally return ERR_PTR(0) which is NULL. The caller is not expecting that and it leads to an Oops. Fixes: dd59239 ("amdkfd: init aperture once per process") Signed-off-by: Dan Carpenter <[email protected]> Reviewed-by: Felix Kuehling <[email protected]> Signed-off-by: Oded Gabbay <[email protected]>
1 parent 047b8e2 commit b312b2b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/gpu/drm/amd/amdkfd/kfd_process.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,8 @@ static struct kfd_process *create_process(const struct task_struct *thread)
318318

319319
/* init process apertures*/
320320
process->is_32bit_user_mode = in_compat_syscall();
321-
if (kfd_init_apertures(process) != 0)
321+
err = kfd_init_apertures(process);
322+
if (err != 0)
322323
goto err_init_apretures;
323324

324325
return process;

0 commit comments

Comments
 (0)