linux_dsm_epyc7002/drivers/gpu/drm/cirrus
Thomas Zimmermann abf7b30d7f drm/cirrus: Use drm_framebuffer_put to avoid kernel oops in clean-up
In the Cirrus driver, the regular clean-up code also performs the clean-up
of a failed initialization. If the fbdev's framebuffer was not initialized,
the clean-up will fail within drm_framebuffer_unregister_private. Booting
with cirrus.bpp=16 triggers this bug.

The framebuffer is currently stored directly within struct cirrus_fbdev. To
fix the bug, we turn it into a pointer that is only set for initialized
framebuffers. The fbdev's clean-up code skips uninitialized framebuffers.

The memory for struct drm_framebuffer is allocated dynamically. This requires
additional error handling within cirrusfb_create. The framebuffer clean-up is
now performed by drm_framebuffer_put, which also frees the data strcuture's
memory.

Link: https://bugzilla.suse.com/show_bug.cgi?id=1101822
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: http://patchwork.freedesktop.org/patch/msgid/20180720112743.27159-1-tzimmermann@suse.de
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2018-08-10 07:57:47 +02:00
..
cirrus_drv.c drm/cirrus: Use the drm_driver.dumb_destroy default 2017-08-16 20:14:22 +02:00
cirrus_drv.h drm/cirrus: Use drm_framebuffer_put to avoid kernel oops in clean-up 2018-08-10 07:57:47 +02:00
cirrus_fbdev.c drm/cirrus: Use drm_framebuffer_put to avoid kernel oops in clean-up 2018-08-10 07:57:47 +02:00
cirrus_main.c drm/cirrus: cirrus_framebuffer -> drm_framebuffer 2018-05-18 14:52:30 +01:00
cirrus_mode.c drm/cirrus: Use drm_framebuffer_put to avoid kernel oops in clean-up 2018-08-10 07:57:47 +02:00
cirrus_ttm.c drm/ttm: add bo as parameter to the ttm_tt_create callback 2018-03-14 14:38:27 -05:00
Kconfig Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into drm-next 2017-01-27 11:00:42 +10:00
Makefile drm/cirrus: fix include notation and remove -Iinclude/drm flag 2017-05-16 17:18:56 +02:00