From: Zhenyu Wang <zhenyuw@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Yan Zhao <yan.y.zhao@intel.com>, David Airlie <airlied@linux.ie>,
intel-gfx@lists.freedesktop.org, kernel-janitors@vger.kernel.org,
linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
intel-gvt-dev@lists.freedesktop.org,
Dan Carpenter <dan.carpenter@oracle.com>
Subject: Re: [Intel-gfx] [PATCH] drm/i915/gvt: fix uninitialized return in intel_gvt_update_reg_whitelist()
Date: Tue, 26 Jan 2021 13:09:01 +0800 [thread overview]
Message-ID: <20210126050901.GF1538@zhen-hp.sh.intel.com> (raw)
In-Reply-To: <161156789392.31416.7341729779003502151@build.alporthouse.com>
[-- Attachment #1.1: Type: text/plain, Size: 970 bytes --]
On 2021.01.25 09:44:53 +0000, Chris Wilson wrote:
> Quoting Dan Carpenter (2021-01-25 08:48:30)
> > Smatch found an uninitialized variable bug in this code:
> >
> > drivers/gpu/drm/i915/gvt/cmd_parser.c:3191 intel_gvt_update_reg_whitelist()
> > error: uninitialized symbol 'ret'.
> >
> > The first thing that Smatch complains about is that "ret" isn't set if
> > we don't enter the "for_each_engine(engine, &dev_priv->gt, id) {" loop.
> > Presumably we always have at least one engine so that's a false
> > positive.
> >
> > But it's definitely a bug to not set "ret" if i915_gem_object_pin_map()
> > fails.
>
> True.
>
> > Let's fix the bug and silence the false positive.
> >
> > Fixes: 493f30cd086e ("drm/i915/gvt: parse init context to update cmd accessible reg whitelist")
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Thanks, Dan & Chris! Queued this up.
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
WARNING: multiple messages have this Message-ID (diff)
From: Zhenyu Wang <zhenyuw@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Yan Zhao <yan.y.zhao@intel.com>, David Airlie <airlied@linux.ie>,
intel-gfx@lists.freedesktop.org, kernel-janitors@vger.kernel.org,
linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
Zhi Wang <zhi.a.wang@intel.com>,
Rodrigo Vivi <rodrigo.vivi@intel.com>,
intel-gvt-dev@lists.freedesktop.org,
Dan Carpenter <dan.carpenter@oracle.com>
Subject: Re: [PATCH] drm/i915/gvt: fix uninitialized return in intel_gvt_update_reg_whitelist()
Date: Tue, 26 Jan 2021 05:09:01 +0000 [thread overview]
Message-ID: <20210126050901.GF1538@zhen-hp.sh.intel.com> (raw)
In-Reply-To: <161156789392.31416.7341729779003502151@build.alporthouse.com>
[-- Attachment #1: Type: text/plain, Size: 970 bytes --]
On 2021.01.25 09:44:53 +0000, Chris Wilson wrote:
> Quoting Dan Carpenter (2021-01-25 08:48:30)
> > Smatch found an uninitialized variable bug in this code:
> >
> > drivers/gpu/drm/i915/gvt/cmd_parser.c:3191 intel_gvt_update_reg_whitelist()
> > error: uninitialized symbol 'ret'.
> >
> > The first thing that Smatch complains about is that "ret" isn't set if
> > we don't enter the "for_each_engine(engine, &dev_priv->gt, id) {" loop.
> > Presumably we always have at least one engine so that's a false
> > positive.
> >
> > But it's definitely a bug to not set "ret" if i915_gem_object_pin_map()
> > fails.
>
> True.
>
> > Let's fix the bug and silence the false positive.
> >
> > Fixes: 493f30cd086e ("drm/i915/gvt: parse init context to update cmd accessible reg whitelist")
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Thanks, Dan & Chris! Queued this up.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: Zhenyu Wang <zhenyuw@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Yan Zhao <yan.y.zhao@intel.com>, David Airlie <airlied@linux.ie>,
intel-gfx@lists.freedesktop.org, kernel-janitors@vger.kernel.org,
linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
Zhi Wang <zhi.a.wang@intel.com>,
Rodrigo Vivi <rodrigo.vivi@intel.com>,
intel-gvt-dev@lists.freedesktop.org,
Dan Carpenter <dan.carpenter@oracle.com>
Subject: Re: [PATCH] drm/i915/gvt: fix uninitialized return in intel_gvt_update_reg_whitelist()
Date: Tue, 26 Jan 2021 13:09:01 +0800 [thread overview]
Message-ID: <20210126050901.GF1538@zhen-hp.sh.intel.com> (raw)
In-Reply-To: <161156789392.31416.7341729779003502151@build.alporthouse.com>
[-- Attachment #1.1: Type: text/plain, Size: 970 bytes --]
On 2021.01.25 09:44:53 +0000, Chris Wilson wrote:
> Quoting Dan Carpenter (2021-01-25 08:48:30)
> > Smatch found an uninitialized variable bug in this code:
> >
> > drivers/gpu/drm/i915/gvt/cmd_parser.c:3191 intel_gvt_update_reg_whitelist()
> > error: uninitialized symbol 'ret'.
> >
> > The first thing that Smatch complains about is that "ret" isn't set if
> > we don't enter the "for_each_engine(engine, &dev_priv->gt, id) {" loop.
> > Presumably we always have at least one engine so that's a false
> > positive.
> >
> > But it's definitely a bug to not set "ret" if i915_gem_object_pin_map()
> > fails.
>
> True.
>
> > Let's fix the bug and silence the false positive.
> >
> > Fixes: 493f30cd086e ("drm/i915/gvt: parse init context to update cmd accessible reg whitelist")
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Thanks, Dan & Chris! Queued this up.
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
WARNING: multiple messages have this Message-ID (diff)
From: Zhenyu Wang <zhenyuw@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Dan Carpenter <dan.carpenter@oracle.com>,
Yan Zhao <yan.y.zhao@intel.com>, David Airlie <airlied@linux.ie>,
intel-gfx@lists.freedesktop.org, kernel-janitors@vger.kernel.org,
linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
Rodrigo Vivi <rodrigo.vivi@intel.com>,
intel-gvt-dev@lists.freedesktop.org,
Zhi Wang <zhi.a.wang@intel.com>
Subject: Re: [PATCH] drm/i915/gvt: fix uninitialized return in intel_gvt_update_reg_whitelist()
Date: Tue, 26 Jan 2021 13:09:01 +0800 [thread overview]
Message-ID: <20210126050901.GF1538@zhen-hp.sh.intel.com> (raw)
In-Reply-To: <161156789392.31416.7341729779003502151@build.alporthouse.com>
[-- Attachment #1: Type: text/plain, Size: 970 bytes --]
On 2021.01.25 09:44:53 +0000, Chris Wilson wrote:
> Quoting Dan Carpenter (2021-01-25 08:48:30)
> > Smatch found an uninitialized variable bug in this code:
> >
> > drivers/gpu/drm/i915/gvt/cmd_parser.c:3191 intel_gvt_update_reg_whitelist()
> > error: uninitialized symbol 'ret'.
> >
> > The first thing that Smatch complains about is that "ret" isn't set if
> > we don't enter the "for_each_engine(engine, &dev_priv->gt, id) {" loop.
> > Presumably we always have at least one engine so that's a false
> > positive.
> >
> > But it's definitely a bug to not set "ret" if i915_gem_object_pin_map()
> > fails.
>
> True.
>
> > Let's fix the bug and silence the false positive.
> >
> > Fixes: 493f30cd086e ("drm/i915/gvt: parse init context to update cmd accessible reg whitelist")
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Thanks, Dan & Chris! Queued this up.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
next prev parent reply other threads:[~2021-01-26 5:24 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-25 8:48 [Intel-gfx] [PATCH] drm/i915/gvt: fix uninitialized return in intel_gvt_update_reg_whitelist() Dan Carpenter
2021-01-25 8:48 ` Dan Carpenter
2021-01-25 8:48 ` Dan Carpenter
2021-01-25 8:48 ` Dan Carpenter
2021-01-25 9:44 ` [Intel-gfx] " Chris Wilson
2021-01-25 9:44 ` Chris Wilson
2021-01-25 9:44 ` Chris Wilson
2021-01-26 5:09 ` Zhenyu Wang [this message]
2021-01-26 5:09 ` Zhenyu Wang
2021-01-26 5:09 ` Zhenyu Wang
2021-01-26 5:09 ` Zhenyu Wang
2021-01-25 12:33 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for " Patchwork
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=20210126050901.GF1538@zhen-hp.sh.intel.com \
--to=zhenyuw@linux.intel.com \
--cc=airlied@linux.ie \
--cc=chris@chris-wilson.co.uk \
--cc=dan.carpenter@oracle.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-gvt-dev@lists.freedesktop.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=yan.y.zhao@intel.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.