drm: qxl: Fix NULL pointer dereference at qxl_alloc_client_monitors_config
authorAnton Vasilyev <vasilyev@ispras.ru>
Fri, 27 Jul 2018 15:30:58 +0000 (18:30 +0300)
committerGerd Hoffmann <kraxel@redhat.com>
Fri, 10 Aug 2018 05:57:49 +0000 (07:57 +0200)
commit66e0c8a5bcfd292606a70268376b44b468c316e8
tree5482dcf85ffae62d51eb03f32a978097da169220
parent5043348a4969ae1661c008efe929abd0d76e3792
drm: qxl: Fix NULL pointer dereference at qxl_alloc_client_monitors_config

If qxl_alloc_client_monitors_config() fails to allocate
client_monitors_config then NULL pointer dereference occurs
in function qxl_display_copy_rom_client_monitors_config() after
qxl_alloc_client_monitors_config() call.

The patch adds return error from qxl_alloc_client_monitors_config()
and additional status for qxl_display_copy_rom_client_monitors_config
return value.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Anton Vasilyev <vasilyev@ispras.ru>
Link: http://patchwork.freedesktop.org/patch/msgid/20180727153058.23620-1-vasilyev@ispras.ru
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
drivers/gpu/drm/qxl/qxl_display.c