Skip to content

Commit 8e9a400

Browse files
committed
Merge tag 'gvt-fixes-2020-02-26' of https://github.com/intel/gvt-linux into drm-intel-fixes
gvt-fixes-2020-02-26 - Fix virtual display reset (Tina) - Fix one use-after-free for dmabuf (Tina) Signed-off-by: Jani Nikula <[email protected]> From: Zhenyu Wang <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2 parents 2387342 + b549c25 commit 8e9a400

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

drivers/gpu/drm/i915/gvt/dmabuf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,12 +151,12 @@ static void dmabuf_gem_object_free(struct kref *kref)
151151
dmabuf_obj = container_of(pos,
152152
struct intel_vgpu_dmabuf_obj, list);
153153
if (dmabuf_obj == obj) {
154+
list_del(pos);
154155
intel_gvt_hypervisor_put_vfio_device(vgpu);
155156
idr_remove(&vgpu->object_idr,
156157
dmabuf_obj->dmabuf_id);
157158
kfree(dmabuf_obj->info);
158159
kfree(dmabuf_obj);
159-
list_del(pos);
160160
break;
161161
}
162162
}

drivers/gpu/drm/i915/gvt/vgpu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -560,9 +560,9 @@ void intel_gvt_reset_vgpu_locked(struct intel_vgpu *vgpu, bool dmlr,
560560

561561
intel_vgpu_reset_mmio(vgpu, dmlr);
562562
populate_pvinfo_page(vgpu);
563-
intel_vgpu_reset_display(vgpu);
564563

565564
if (dmlr) {
565+
intel_vgpu_reset_display(vgpu);
566566
intel_vgpu_reset_cfg_space(vgpu);
567567
/* only reset the failsafe mode when dmlr reset */
568568
vgpu->failsafe = false;

0 commit comments

Comments
 (0)