drm: avoid exposing kernel stack in compat_drm_getstats
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Sun, 21 Aug 2016 17:56:19 +0000 (19:56 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 22 Aug 2016 07:27:06 +0000 (09:27 +0200)
commitec913f31a570b57e72e69b4122de70a6b2ef760f
tree18d225834816c1dcaea8c5e441a79d97cbb0a17d
parentf5bef0b85e5d1586bb2f34035917d5e4c475cea2
drm: avoid exposing kernel stack in compat_drm_getstats

The C standard does not specify the size of the integer used
to store an enum. Hence in structure drm_stats32_t alignment
bytes may exist.

To avoid exposing bytes from the kernel stack it is
necessary to initialize variable s32 completely.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1471802179-2886-1-git-send-email-xypron.glpk@gmx.de
drivers/gpu/drm/drm_ioc32.c