From: Thierry Reding Date: Mon, 3 Nov 2014 10:57:33 +0000 (+0100) Subject: drm/omap: gem: dumb: pitch is an output X-Git-Tag: omap-for-v3.19/fixes-rc1~80^2~57^2~3 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bdb2b933f2622578b8f737ad21504eb83620024a;p=pandora-kernel.git drm/omap: gem: dumb: pitch is an output When creating a dumb buffer object using the DRM_IOCTL_MODE_CREATE_DUMB IOCTL, only the width, height, bpp and flags fields are inputs. The caller is not guaranteed to zero out or set handle, pitch and size. Drivers must not treat these values as possible inputs, otherwise they may use uninitialized memory during the computation of the framebuffer size. The OMAP driver uses the pitch field passed in by userspace as a minimum and only override it if the driver-computed pitch is larger than what userspace provided. To prevent this from causing overallocation, fix the minimum pitch to 0 to enforce the driver-computed pitch. Cc: Tomi Valkeinen Reviewed-by: Daniel Vetter Reviewed-by: Rob Clark Acked-by: Tomi Valkeinen Signed-off-by: Thierry Reding --- Reading git-diff-tree failed