OSDN Git Service

drm: add a check for x/y in drm_mode_setcrtc
authorZhao Junwang <zhjwpku@gmail.com>
Tue, 7 Jul 2015 09:08:35 +0000 (17:08 +0800)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 7 Jul 2015 12:05:12 +0000 (14:05 +0200)
commit01447e9f04ba1c49a9534ae6a5a6f26c2bb05226
tree73c261984d099bfe5eb37d4236a32d3938e46e10
parent41315b793e13f884cda79389f0d5d44d027e57d1
drm: add a check for x/y in drm_mode_setcrtc

legacy setcrtc ioctl does take a 32 bit value which might indeed
overflow

the checks of crtc_req->x > INT_MAX and crtc_req->y > INT_MAX aren't
needed any more with this

v2: -polish the annotation according to Daniel's comment

Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Zhao Junwang <zhjwpku@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/drm_crtc.c