]> git.baikalelectronics.ru Git - kernel.git/commit
drm: Fix uabi regression by allowing garbage mode->type from userspace
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 21 Mar 2018 21:12:46 +0000 (23:12 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 23 Mar 2018 11:51:12 +0000 (13:51 +0200)
commit41e53a75173a7b6ecd58094084cb9c3af0ce0c9f
treee3dd9e41cc47c273391c020620d5274af8f8de4c
parent0e168442a995516bd689ac61f02f003043214775
drm: Fix uabi regression by allowing garbage mode->type from userspace

Apparently xf86-video-vmware leaves the mode->type uninitialized
when feeding the mode to the kernel. Thus we have no choice but
to accept the garbage in. We'll just ignore any of the bits we
don't want. The mode type is just a hint anyway, and more
useful for the kernel->userspace direction.

Reported-by: Thomas Hellstrom <thomas@shipmail.org>
CC: Thomas Hellstrom <thomas@shipmail.org>
Cc: Adam Jackson <ajax@redhat.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Fixes: 2848ce2fa8d1 ("drm/uapi: Validate the mode flags/type")
References: https://lists.freedesktop.org/archives/dri-devel/2018-March/170213.html
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180321211246.10152-1-ville.syrjala@linux.intel.com
Tested-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
drivers/gpu/drm/drm_modes.c