mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 10:58:48 +09:00
drm/i915: Fix oops in overlay due to frontbuffer tracking
commit9169757ae6upstream. The vma will be NULL if the overlay was previously off, so dereferencing it will oops. Check for NULL before doing that. Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Fixes:9b3b7841b8("drm/i915/overlay: Use VMA as the primary tracker for images") Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1481131693-27993-2-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commit4a15cdbbc5) Signed-off-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
5652dd3f00
commit
73d4256359
@@ -840,8 +840,8 @@ static int intel_overlay_do_put_image(struct intel_overlay *overlay,
|
||||
if (ret)
|
||||
goto out_unpin;
|
||||
|
||||
i915_gem_track_fb(overlay->vma->obj, new_bo,
|
||||
INTEL_FRONTBUFFER_OVERLAY(pipe));
|
||||
i915_gem_track_fb(overlay->vma ? overlay->vma->obj : NULL,
|
||||
vma->obj, INTEL_FRONTBUFFER_OVERLAY(pipe));
|
||||
|
||||
overlay->old_vma = overlay->vma;
|
||||
overlay->vma = vma;
|
||||
|
||||
Reference in New Issue
Block a user