]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: fix uninitialized pointer reads on pointers to and from
authorColin Ian King <colin.king@canonical.com>
Thu, 19 Dec 2019 19:09:16 +0000 (19:09 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 19 Dec 2019 19:47:38 +0000 (19:47 +0000)
commitf6b374f9bd58b546bd13e870df6f9664cc05b6eb
treec211170cc59e15d60d081312ab3cd0d80334a3d4
parentc1ad96fa2851b4d1e583c791d791d8fa3ccef6fc
drm/i915: fix uninitialized pointer reads on pointers to and from

Currently pointers to and from are not initialized and may contain
garbage values. This will cause uninitialized pointer reads in the
call to intel_frontbuffer_track and later checks to see if to and from
are null.  Fix this by ensuring to and from are initialized to NULL.

Addresses-Coverity: ("Uninitialised pointer read)"
Fixes: 54a2250290e0 ("drm/i915: Hold reference to intel_frontbuffer as we track activity")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20191219190916.24693-1-colin.king@canonical.com
drivers/gpu/drm/i915/display/intel_overlay.c