OSDN Git Service

drm/vmwgfx: fix memory corruption with legacy/sou connectors
authorRob Clark <rclark@redhat.com>
Wed, 17 Jan 2018 15:16:20 +0000 (10:16 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 23 Jan 2018 18:58:18 +0000 (19:58 +0100)
commit8f0b1d5cfff904fc2dc4a1389cf3296037d1ec51
treefb20491819cb31a7ae1da8714f5d9c2c82e12246
parenta6d5930ccf3c746fa737b221d42adb6811945eec
drm/vmwgfx: fix memory corruption with legacy/sou connectors

commit 8a510a5c75261ba0ec39155326982aa786541e29 upstream.

It looks like in all cases 'struct vmw_connector_state' is used.  But
only in stdu connectors, was atomic_{duplicate,destroy}_state() properly
subclassed.  Leading to writes beyond the end of the allocated connector
state block and all sorts of fun memory corruption related crashes.

Fixes: d7721ca71126 "drm/vmwgfx: Connector atomic state"
Signed-off-by: Rob Clark <rclark@redhat.com>
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c