Skip to content

Commit

Permalink
Merge tag 'drm-amdkfd-fixes-2015-07-09' of git://people.freedesktop.o…
Browse files Browse the repository at this point in the history
…rg/~gabbayo/linux into drm-fixes

A single fix so far for 4.2:
- checking a pointer is not null before using it

* tag 'drm-amdkfd-fixes-2015-07-09' of git://people.freedesktop.org/~gabbayo/linux:
  drm/amdkfd: validate pdd where it acquired first
  • Loading branch information
Dave Airlie committed Jul 10, 2015
2 parents 9d5715f + a0f6744 commit 008b3f1
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions drivers/gpu/drm/amd/amdkfd/kfd_process.c
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,12 @@ void kfd_unbind_process_from_device(struct kfd_dev *dev, unsigned int pasid)
pqm_uninit(&p->pqm);

pdd = kfd_get_process_device_data(dev, p);

if (!pdd) {
mutex_unlock(&p->mutex);
return;
}

if (pdd->reset_wavefronts) {
dbgdev_wave_reset_wavefronts(pdd->dev, p);
pdd->reset_wavefronts = false;
Expand All @@ -431,8 +437,7 @@ void kfd_unbind_process_from_device(struct kfd_dev *dev, unsigned int pasid)
* We don't call amd_iommu_unbind_pasid() here
* because the IOMMU called us.
*/
if (pdd)
pdd->bound = false;
pdd->bound = false;

mutex_unlock(&p->mutex);
}
Expand Down

0 comments on commit 008b3f1

Please sign in to comment.