drm: Check property/enum name length
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 2 Mar 2018 14:03:00 +0000 (16:03 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 6 Mar 2018 16:03:02 +0000 (18:03 +0200)
commit5ebbb5b4d424e030b7d240ce71767c4145c7f26e
tree7bbd284ea36f2db190f0bbe385c6fd5422399657
parent8e5e83ad8250043c8d5cc8f2bf672e64c43f948a
drm: Check property/enum name length

Reject requests to add properties/enums with an overly long name.
Previously we would have just silently truncated the string and exposed
it userspace.

v2: drm_property_create() returns a pointer

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180302140300.31110-1-ville.syrjala@linux.intel.com
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/drm_property.c