Skip to content

Commit

Permalink
vmwgfx: Fix unitialized stack read in vmw_setup_otable_base
Browse files Browse the repository at this point in the history
One of the error paths in vmw_setup_otable_base causes us to return with
'ret' having never been set to anything causing us to return whatever was
on the stack.

Found with Coverity

Signed-off-by: Dave Jones <davej@fedoraproject.org>
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
  • Loading branch information
Dave Jones authored and Thomas Hellstrom committed Feb 5, 2014
1 parent 30f82d8 commit cd9a21a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/gpu/drm/vmwgfx/vmwgfx_mob.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ static int vmw_setup_otable_base(struct vmw_private *dev_priv,
cmd = vmw_fifo_reserve(dev_priv, sizeof(*cmd));
if (unlikely(cmd == NULL)) {
DRM_ERROR("Failed reserving FIFO space for OTable setup.\n");
ret = -ENOMEM;
goto out_no_fifo;
}

Expand Down

0 comments on commit cd9a21a

Please sign in to comment.