Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 008b3f1f authored by Dave Airlie's avatar Dave Airlie
Browse files

Merge tag 'drm-amdkfd-fixes-2015-07-09' of...

Merge tag 'drm-amdkfd-fixes-2015-07-09' of git://people.freedesktop.org/~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
parents 9d5715f9 a0f67441
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -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;
@@ -431,7 +437,6 @@ 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;

	mutex_unlock(&p->mutex);