]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/vmwgfx: Don't double-free the mode stored in par->set_mode
authorThomas Zimmermann <tzimmermann@suse.de>
Mon, 18 Mar 2019 14:47:58 +0000 (15:47 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 27 Mar 2019 05:13:51 +0000 (14:13 +0900)
commit47248fde59a60a31a55d489f4851836f0ac94295
treeed02e8caa21479b65ec3e5028ef8a84c9747aeee
parent3ce190bbca8cbacf3796aacad2f2f441725799d7
drm/vmwgfx: Don't double-free the mode stored in par->set_mode

commit c2d311553855395764e2e5bf401d987ba65c2056 upstream.

When calling vmw_fb_set_par(), the mode stored in par->set_mode gets free'd
twice. The first free is in vmw_fb_kms_detach(), the second is near the
end of vmw_fb_set_par() under the name of 'old_mode'. The mode-setting code
only works correctly if the mode doesn't actually change. Removing
'old_mode' in favor of using par->set_mode directly fixes the problem.

Cc: <stable@vger.kernel.org>
Fixes: a278724aa23c ("drm/vmwgfx: Implement fbdev on kms v2")
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Deepak Rawat <drawat@vmware.com>
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/vmwgfx/vmwgfx_fb.c