All of lore.kernel.org
 help / color / mirror / Atom feed
* [bug report] drm/vmwgfx: Use new validation interface for the modesetting code v2
@ 2018-10-11 12:19 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2018-10-11 12:19 UTC (permalink / raw)
  To: thellstrom; +Cc: dri-devel

Hello Thomas Hellstrom,

The patch 2724b2d54cda: "drm/vmwgfx: Use new validation interface for
the modesetting code v2" from Sep 26, 2018, leads to the following
static checker warning:

	drivers/gpu/drm/vmwgfx/vmwgfx_kms.c:2606 vmw_kms_helper_validation_finish()
	error: uninitialized symbol 'handle'.

drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
  2587  void vmw_kms_helper_validation_finish(struct vmw_private *dev_priv,
  2588                                        struct drm_file *file_priv,
  2589                                        struct vmw_validation_context *ctx,
  2590                                        struct vmw_fence_obj **out_fence,
  2591                                        struct drm_vmw_fence_rep __user *
  2592                                        user_fence_rep)
  2593  {
  2594          struct vmw_fence_obj *fence = NULL;
  2595          uint32_t handle;
  2596          int ret;
  2597  
  2598          if (file_priv || user_fence_rep || vmw_validation_has_bos(ctx) ||
  2599              out_fence)
  2600                  ret = vmw_execbuf_fence_commands(file_priv, dev_priv, &fence,
  2601                                                   file_priv ? &handle : NULL);
  2602          vmw_validation_done(ctx, fence);
  2603          if (file_priv)
  2604                  vmw_execbuf_copy_fence_user(dev_priv, vmw_fpriv(file_priv),
  2605                                              ret, user_fence_rep, fence,
                                                    ^^^
  2606                                              handle, -1, NULL);
                                                    ^^^^^^

So instead of handling vmw_execbuf_fence_commands() errors here, we pass
it to vmw_execbuf_copy_fence_user() which presumably does the right
thing.  But the warning is correct that "handle" can be uninitialized
here.

  2607          if (out_fence)
  2608                  *out_fence = fence;
  2609          else
  2610                  vmw_fence_obj_unreference(&fence);
  2611  }



regards,
dan carpenter
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-10-11 12:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-11 12:19 [bug report] drm/vmwgfx: Use new validation interface for the modesetting code v2 Dan Carpenter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.