Skip to content

Commit a73b603

Browse files
committed
Merge tag 'drm-intel-fixes-2022-11-17' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes
- Fix uaf with lmem_userfault_list handling (Matthew Auld) Signed-off-by: Dave Airlie <[email protected]> From: Tvrtko Ursulin <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/Y3X2bNJ/4GR1BAiG@tursulin-desk
2 parents 5fa8813 + 4f68332 commit a73b603

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/gpu/drm/i915/gem/i915_gem_ttm.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1013,9 +1013,6 @@ static vm_fault_t vm_fault_ttm(struct vm_fault *vmf)
10131013
return VM_FAULT_SIGBUS;
10141014
}
10151015

1016-
if (i915_ttm_cpu_maps_iomem(bo->resource))
1017-
wakeref = intel_runtime_pm_get(&to_i915(obj->base.dev)->runtime_pm);
1018-
10191016
if (!i915_ttm_resource_mappable(bo->resource)) {
10201017
int err = -ENODEV;
10211018
int i;
@@ -1042,6 +1039,9 @@ static vm_fault_t vm_fault_ttm(struct vm_fault *vmf)
10421039
}
10431040
}
10441041

1042+
if (i915_ttm_cpu_maps_iomem(bo->resource))
1043+
wakeref = intel_runtime_pm_get(&to_i915(obj->base.dev)->runtime_pm);
1044+
10451045
if (drm_dev_enter(dev, &idx)) {
10461046
ret = ttm_bo_vm_fault_reserved(vmf, vmf->vma->vm_page_prot,
10471047
TTM_BO_VM_NUM_PREFAULT);

0 commit comments

Comments
 (0)