drm: qxl: ensure surf.data is ininitialized
authorColin Ian King <colin.king@canonical.com>
Tue, 8 Jun 2021 16:13:13 +0000 (17:13 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Jul 2021 14:56:20 +0000 (16:56 +0200)
commit1ccbb552e3d2064b7c43c2bb9fa71306b6c28f9f
treec87062ab094d1e688f22268d8a8872fb2d33260f
parentbdc16fe9df1743e9198363ddeb0cf3d9975a05c1
drm: qxl: ensure surf.data is ininitialized

[ Upstream commit fbbf23ddb2a1cc0c12c9f78237d1561c24006f50 ]

The object surf is not fully initialized and the uninitialized
field surf.data is being copied by the call to qxl_bo_create
via the call to qxl_gem_object_create. Set surf.data to zero
to ensure garbage data from the stack is not being copied.

Addresses-Coverity: ("Uninitialized scalar variable")
Fixes: f64122c1f6ad ("drm: add new QXL driver. (v1.4)")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20210608161313.161922-1-colin.king@canonical.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/qxl/qxl_dumb.c