mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-22 13:02:19 +07:00
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: dd59239a98
("amdkfd: init aperture once per process")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Felix Kuehling <felix.kuehling@amd.com>
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
This commit is contained in:
parent
047b8e21e3
commit
b312b2b25b
@ -318,7 +318,8 @@ static struct kfd_process *create_process(const struct task_struct *thread)
|
||||
|
||||
/* init process apertures*/
|
||||
process->is_32bit_user_mode = in_compat_syscall();
|
||||
if (kfd_init_apertures(process) != 0)
|
||||
err = kfd_init_apertures(process);
|
||||
if (err != 0)
|
||||
goto err_init_apretures;
|
||||
|
||||
return process;
|
||||
|
Loading…
Reference in New Issue
Block a user