From: Ryan Mallon Date: Fri, 27 Jan 2012 21:51:40 +0000 (+1100) Subject: vmwgfx: Fix assignment in vmw_framebuffer_create_handle X-Git-Tag: upstream/snapshot3+hdmi~8229^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bf9c05d5b6d19b3e4c9fe21047694e94f48db89b;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git vmwgfx: Fix assignment in vmw_framebuffer_create_handle The assignment of handle in vmw_framebuffer_create_handle doesn't actually do anything useful and is incorrectly assigning an integer value to a pointer argument. It appears that this is a typo and should be dereferencing handle rather than assigning to it directly. This fixes a bug where an undefined handle value is potentially returned to user-space. Signed-off-by: Ryan Mallon Reviewed-by: Jakob Bornecrantz Cc: stable@vger.kernel.org Signed-off-by: Dave Airlie --- diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c index 0af6ebd..b66ef0e 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c @@ -378,7 +378,7 @@ int vmw_framebuffer_create_handle(struct drm_framebuffer *fb, unsigned int *handle) { if (handle) - handle = 0; + *handle = 0; return 0; }