]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Fix error path leak in fbdev fb allocation
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 10 Feb 2014 17:00:39 +0000 (18:00 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 12 Feb 2014 17:53:02 +0000 (18:53 +0100)
commit04edf1c86017015ffa4faf232b1b96ac42edfed7
tree56f0b21a168e442a3000cb517a93b84dba7ceacf
parentdbb53aa9f2488bc0ba43d11c0b3e4ad83f884fc5
drm/i915: Fix error path leak in fbdev fb allocation

In Jesse's patch to switch the fbdev framebuffer from an embedded
struct to a pointer the kfree in case of an error was missed. Fix this
up by using our own internal fb allocation helper directly instead of
reinventing that wheel.

We need a to_intel_framebuffer cast unfortunately since all the other
callers of _create still look better whith using a drm_framebuffer as
return pointer.

v2: Add an unlocked __intel_framebuffer_create function since our
dev->struct_mutex locking is too much a mess. With ppgtt we even need
it to take a look at the global gtt offset of pinned objects, since
the vma list might chance from underneath us. At least with the
current global gtt lookup functions. Reported by Mika.

Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_display.c
drivers/gpu/drm/i915/intel_drv.h
drivers/gpu/drm/i915/intel_fbdev.c