drm/i915/fbdev: Check for the framebuffer before use
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 13 Jul 2016 17:34:45 +0000 (18:34 +0100)
committerJani Nikula <jani.nikula@intel.com>
Thu, 4 Aug 2016 07:53:18 +0000 (10:53 +0300)
commitc45eb4fed12d278d3619f1904885bd0d7bcbf036
treee08984473729a37531fb800154b48394b9a4a519
parenta7b4667a00025ac28300737c868bd4818b6d8c4d
drm/i915/fbdev: Check for the framebuffer before use

If the fbdev probing fails, and in our error path we fail to clear the
dev_priv->fbdev, then we can try and use a dangling fbdev pointer, and
in particular a NULL fb. This could also happen in pathological cases
where we try to operate on the fbdev prior to it being probed.

Reported-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1468431285-28264-2-git-send-email-chris@chris-wilson.co.uk
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
(cherry picked from commit 6bc265424df02f8162f4a17a37e4982e1c64460e)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/intel_fbdev.c
This page took 0.02549 seconds and 5 git commands to generate.