From: Michal Wajdeczko <michal.wajdeczko@intel.com>
To: Dan Carpenter <dan.carpenter@linaro.org>,
"Everest K.C." <everestkc@everestkc.com.np>
Cc: lucas.demarchi@intel.com, thomas.hellstrom@linux.intel.com,
rodrigo.vivi@intel.com, maarten.lankhorst@linux.intel.com,
mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com,
simona@ffwll.ch, skhan@linuxfoundation.org,
intel-xe@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH V3] drm/xe/guc: Fix dereference before NULL check
Date: Thu, 10 Oct 2024 11:33:45 +0200 [thread overview]
Message-ID: <6f64b79b-391e-4c78-98ac-8741b82201b4@intel.com> (raw)
In-Reply-To: <1a5407c4-3b0f-48a1-940a-cc6b3ff3fb12@stanley.mountain>
On 10.10.2024 08:54, Dan Carpenter wrote:
> On Thu, Oct 10, 2024 at 12:46:34AM -0600, Everest K.C. wrote:
>> The pointer list->list is dereferenced before the NULL check.
>> Fix this by moving the NULL check outside the for loop, so that
>> the check is performed before the dereferencing.
>> The list->list pointer cannot be NULL so this has no effect on runtime.
>> It's just a correctness issue.
>>
>> This issue was reported by Coverity Scan.
>> https://scan7.scan.coverity.com/#/project-view/51525/11354?selectedIssue=1600335
>>
>> Fixes: a18c696fa5cb ("drm/xe/guc: Fix dereference before Null check")
hmm, this seems wrong, shouldn't this be:
Fixes: 0f1fdf559225 ("drm/xe/guc: Save manual engine capture into
capture list")
>> Signed-off-by: Everest K.C. <everestkc@everestkc.com.np>
>> ---
>
> Perfect! Thanks.
>
> Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
>
> regards,
> dan carpenter
>
next prev parent reply other threads:[~2024-10-10 9:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-10 6:46 [PATCH V3] drm/xe/guc: Fix dereference before NULL check Everest K.C.
2024-10-10 6:54 ` Dan Carpenter
2024-10-10 9:33 ` Michal Wajdeczko [this message]
2024-10-15 14:41 ` Dong, Zhanjun
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=6f64b79b-391e-4c78-98ac-8741b82201b4@intel.com \
--to=michal.wajdeczko@intel.com \
--cc=airlied@gmail.com \
--cc=dan.carpenter@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=everestkc@everestkc.com.np \
--cc=intel-xe@lists.freedesktop.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lucas.demarchi@intel.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=rodrigo.vivi@intel.com \
--cc=simona@ffwll.ch \
--cc=skhan@linuxfoundation.org \
--cc=thomas.hellstrom@linux.intel.com \
--cc=tzimmermann@suse.de \
/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