From: Zack Rusin <zackr@vmware.com>
To: "dan.carpenter@oracle.com" <dan.carpenter@oracle.com>
Cc: "airlied@linux.ie" <airlied@linux.ie>,
"kernel-janitors@vger.kernel.org"
<kernel-janitors@vger.kernel.org>,
Linux-graphics-maintainer <Linux-graphics-maintainer@vmware.com>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH] drm/vmwgfx: clean up some error pointer checking
Date: Wed, 20 Jul 2022 13:22:14 +0000 [thread overview]
Message-ID: <feb694b8757823f35f0d786d64179cc99b891bd2.camel@vmware.com> (raw)
In-Reply-To: <YtZ9qrKeBqmmK8Hv@kili>
On Tue, 2022-07-19 at 12:47 +0300, Dan Carpenter wrote:
> The vmw_user_bo_noref_lookup() function cannot return NULL. If it
> could, then this function would return PTR_ERR(NULL) which is success.
> Returning success without initializing "*vmw_bo_p = vmw_bo;" would
> lead to an uninitialized variable bug in the caller. Smatch complains
> about this:
>
> drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c:1177 vmw_translate_mob_ptr() warn: passing zero to 'PTR_ERR'
> drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c:1314 vmw_cmd_dx_bind_query() error: uninitialized symbol 'vmw_bo'.
Thanks, Dan.
I'll push it through the drm-misc tree.
z
prev parent reply other threads:[~2022-07-20 13:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-19 9:47 [PATCH] drm/vmwgfx: clean up some error pointer checking Dan Carpenter
2022-07-20 13:22 ` Zack Rusin [this message]
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=feb694b8757823f35f0d786d64179cc99b891bd2.camel@vmware.com \
--to=zackr@vmware.com \
--cc=Linux-graphics-maintainer@vmware.com \
--cc=airlied@linux.ie \
--cc=dan.carpenter@oracle.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=kernel-janitors@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox