]> Git Repo - linux.git/commitdiff
vmwgfx: Fix assignment in vmw_framebuffer_create_handle
authorRyan Mallon <[email protected]>
Fri, 27 Jan 2012 21:51:40 +0000 (08:51 +1100)
committerDave Airlie <[email protected]>
Mon, 30 Jan 2012 09:32:39 +0000 (09:32 +0000)
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 <[email protected]>
Reviewed-by: Jakob Bornecrantz<[email protected]>
Cc: [email protected]
Signed-off-by: Dave Airlie <[email protected]>
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c

index 0af6ebdf205d821c6b68c825ea7db1ada77dff42..b66ef0e3cde14a2f98fa8d2a1245f41ca83c3268 100644 (file)
@@ -378,7 +378,7 @@ int vmw_framebuffer_create_handle(struct drm_framebuffer *fb,
                                  unsigned int *handle)
 {
        if (handle)
-               handle = 0;
+               *handle = 0;
 
        return 0;
 }
This page took 0.044619 seconds and 4 git commands to generate.