All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: thellstrom@vmware.com
Cc: dri-devel@lists.freedesktop.org
Subject: [bug report] drm/vmwgfx: Use new validation interface for the modesetting code v2
Date: Thu, 11 Oct 2018 15:19:05 +0300	[thread overview]
Message-ID: <20181011121905.GA22657@mwanda> (raw)

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

                 reply	other threads:[~2018-10-11 12:19 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181011121905.GA22657@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=thellstrom@vmware.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.