[PATCH AUTOSEL 6.0 7/7] drm/amdkfd: Fix double release compute pasid

2022-12-31 Thread Sasha Levin
From: Philip Yang [ Upstream commit 1a799c4c190ea9f0e81028e3eb3037ed0ab17ff5 ] If kfd_process_device_init_vm returns failure after vm is converted to compute vm and vm->pasid set to compute pasid, KFD will not take pdd->drm_file reference. As a result, drm close file handler maybe called to rele

[PATCH AUTOSEL 6.0 6/7] drm/amdkfd: Fix kfd_process_device_init_vm error handling

2022-12-31 Thread Sasha Levin
From: Philip Yang [ Upstream commit 29d48b87db64b6697ddad007548e51d032081c59 ] Should only destroy the ib_mem and let process cleanup worker to free the outstanding BOs. Reset the pointer in pdd->qpd structure, to avoid NULL pointer access in process destroy worker. BUG: kernel NULL pointer de

[PATCH AUTOSEL 6.0 5/7] drm/amdgpu: Fix size validation for non-exclusive domains (v4)

2022-12-31 Thread Sasha Levin
From: Luben Tuikov [ Upstream commit 7554886daa31eacc8e7fac9e15bbce67d10b8f1f ] Fix amdgpu_bo_validate_size() to check whether the TTM domain manager for the requested memory exists, else we get a kernel oops when dereferencing "man". v2: Make the patch standalone, i.e. not dependent on local p

[PATCH AUTOSEL 6.1 7/7] drm/amdkfd: Fix double release compute pasid

2022-12-31 Thread Sasha Levin
From: Philip Yang [ Upstream commit 1a799c4c190ea9f0e81028e3eb3037ed0ab17ff5 ] If kfd_process_device_init_vm returns failure after vm is converted to compute vm and vm->pasid set to compute pasid, KFD will not take pdd->drm_file reference. As a result, drm close file handler maybe called to rele

[PATCH AUTOSEL 6.1 5/7] drm/amdgpu: Fix size validation for non-exclusive domains (v4)

2022-12-31 Thread Sasha Levin
From: Luben Tuikov [ Upstream commit 7554886daa31eacc8e7fac9e15bbce67d10b8f1f ] Fix amdgpu_bo_validate_size() to check whether the TTM domain manager for the requested memory exists, else we get a kernel oops when dereferencing "man". v2: Make the patch standalone, i.e. not dependent on local p

[PATCH AUTOSEL 6.1 6/7] drm/amdkfd: Fix kfd_process_device_init_vm error handling

2022-12-31 Thread Sasha Levin
From: Philip Yang [ Upstream commit 29d48b87db64b6697ddad007548e51d032081c59 ] Should only destroy the ib_mem and let process cleanup worker to free the outstanding BOs. Reset the pointer in pdd->qpd structure, to avoid NULL pointer access in process destroy worker. BUG: kernel NULL pointer de