drm: Check user mode against overflows
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 13 Mar 2012 10:35:44 +0000 (12:35 +0200)
committerDave Airlie <airlied@redhat.com>
Thu, 15 Mar 2012 09:50:39 +0000 (09:50 +0000)
commit90367bf6e98352520d15634ac4e79f0d4598cff1
tree3a7024ae8e30e2186ca71893243fd6b4c0576f13
parentee34ab5b01e6e7cbd9438aeb6ccbd08d3727988e
drm: Check user mode against overflows

The internal mode representation drm_display_mode uses signed data
types. When converting the user mode to internal representation,
check that the unsigned values don't overflow the signed datatypes.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/drm_crtc.c