From: "Nilawar, Badal" <badal.nilawar@intel.com>
To: "Colin Ian King" <colin.i.king@gmail.com>,
"Lucas De Marchi" <lucas.demarchi@intel.com>,
"Thomas Hellström" <thomas.hellstrom@linux.intel.com>,
"Rodrigo Vivi" <rodrigo.vivi@intel.com>,
"David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>,
"Daniele Ceraolo Spurio" <daniele.ceraolospurio@intel.com>,
intel-xe@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Cc: <kernel-janitors@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH][next][V2] drm/xe/xe_late_bind_fw: Fix missing initialization of variable offset
Date: Thu, 25 Sep 2025 17:34:49 +0530 [thread overview]
Message-ID: <19cadb88-1b80-444e-a062-54f3f42c856d@intel.com> (raw)
In-Reply-To: <20250924102208.9216-1-colin.i.king@gmail.com>
On 24-09-2025 15:52, Colin Ian King wrote:
> The variable offset is not being initialized, and it is only set inside
> a for-loop if entry->name is the same as manifest_entry. In the case
> where it is not initialized a non-zero check on offset is potentialy checking
> a bogus uninitalized value. Fix this by initializing offset to zero.
>
> Fixes: efa29317a553 ("drm/xe/xe_late_bind_fw: Extract and print version info")
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Reviewed-by: Badal Nilawar <badal.nilawar@intel.com>
> ---
>
> V2: Fix identical issue in parse_lb_layout that I ommitted in the first
> patch
>
> ---
> drivers/gpu/drm/xe/xe_late_bind_fw.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_late_bind_fw.c b/drivers/gpu/drm/xe/xe_late_bind_fw.c
> index 38f3feb2aecd..8f5082e689dc 100644
> --- a/drivers/gpu/drm/xe/xe_late_bind_fw.c
> +++ b/drivers/gpu/drm/xe/xe_late_bind_fw.c
> @@ -60,7 +60,7 @@ static int parse_cpd_header(struct xe_late_bind_fw *lb_fw,
> const struct gsc_manifest_header *manifest;
> const struct gsc_cpd_entry *entry;
> size_t min_size = sizeof(*header);
> - u32 offset;
> + u32 offset = 0;
> int i;
>
> /* manifest_entry is mandatory */
> @@ -116,7 +116,7 @@ static int parse_lb_layout(struct xe_late_bind_fw *lb_fw,
> const struct csc_fpt_header *header = data;
> const struct csc_fpt_entry *entry;
> size_t min_size = sizeof(*header);
> - u32 offset;
> + u32 offset = 0;
> int i;
>
> /* fpt_entry is mandatory */
next prev parent reply other threads:[~2025-09-25 12:05 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-24 10:22 [PATCH][next][V2] drm/xe/xe_late_bind_fw: Fix missing initialization of variable offset Colin Ian King
2025-09-24 10:53 ` ✗ CI.checkpatch: warning for drm/xe/xe_late_bind_fw: Fix missing initialization of variable offset (rev2) Patchwork
2025-09-24 10:54 ` ✓ CI.KUnit: success " Patchwork
2025-09-24 11:29 ` ✓ Xe.CI.BAT: " Patchwork
2025-09-24 14:08 ` ✗ Xe.CI.Full: failure " Patchwork
2025-09-25 12:04 ` Nilawar, Badal [this message]
2025-09-29 15:49 ` [PATCH][next][V2] drm/xe/xe_late_bind_fw: Fix missing initialization of variable offset Cavitt, Jonathan
2025-09-30 14:32 ` Rodrigo Vivi
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=19cadb88-1b80-444e-a062-54f3f42c856d@intel.com \
--to=badal.nilawar@intel.com \
--cc=airlied@gmail.com \
--cc=colin.i.king@gmail.com \
--cc=daniele.ceraolospurio@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lucas.demarchi@intel.com \
--cc=rodrigo.vivi@intel.com \
--cc=simona@ffwll.ch \
--cc=thomas.hellstrom@linux.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox