[Intel-gfx] [PATCH 2/2] drm: Pass the user drm_mode_fb_cmd2 as const to .fb_create()

Tvrtko Ursulin tvrtko.ursulin at linux.intel.com
Mon Nov 16 07:20:54 PST 2015


Hi,

On 11/11/15 17:11, ville.syrjala at linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
>
> Drivers shouldn't clobber the passed in addfb ioctl parameters.
> i915 was doing just that. To prevent it from happening again,
> pass the struct around as const, starting all the way from
> internal_framebuffer_create().

Would it be safer (const pointer is quite weak) and less invasive to 
make a copy of the struct at the DRM level, in 
internal_framebuffer_create, or alternatively one level up?

Regards,

Tvrtko



More information about the dri-devel mailing list