From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Ashok Raj <ashok.raj@intel.com>
Cc: Hans de Goede <hdegoede@redhat.com>,
markgross@kernel.org, Jithu Joseph <jithu.joseph@intel.com>,
rostedt@goodmis.org, tony.luck@intel.com,
LKML <linux-kernel@vger.kernel.org>,
platform-driver-x86@vger.kernel.org, patches@lists.linux.dev,
pengfei.xu@intel.com
Subject: Re: [PATCH 1/5] platform/x86/intel/ifs: Call release_firmware() when handling errors.
Date: Thu, 25 Jan 2024 15:04:01 +0200 (EET) [thread overview]
Message-ID: <497dbb51-e583-374f-b31a-e14f1253c93f@linux.intel.com> (raw)
In-Reply-To: <20240125082254.424859-2-ashok.raj@intel.com>
[-- Attachment #1: Type: text/plain, Size: 1385 bytes --]
On Thu, 25 Jan 2024, Ashok Raj wrote:
> From: Jithu Joseph <jithu.joseph@intel.com>
>
> Missing release_firmware() due to error handling blocked any future image
> loading.
>
> Fix the return code and release_fiwmare() to release the bad image.
>
> Fixes: 25a76dbb36dd ("platform/x86/intel/ifs: Validate image size")
> Reported-by: Pengfei Xu <pengfei.xu@intel.com>
> Signed-off-by: Jithu Joseph <jithu.joseph@intel.com>
> Signed-off-by: Ashok Raj <ashok.raj@intel.com>
> Tested-by: Pengfei Xu <pengfei.xu@intel.com>
> Reviewed-by: Tony Luck <tony.luck@intel.com>
> ---
> drivers/platform/x86/intel/ifs/load.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/platform/x86/intel/ifs/load.c b/drivers/platform/x86/intel/ifs/load.c
> index a1ee1a74fc3c..2cf3b4a8813f 100644
> --- a/drivers/platform/x86/intel/ifs/load.c
> +++ b/drivers/platform/x86/intel/ifs/load.c
> @@ -399,7 +399,8 @@ int ifs_load_firmware(struct device *dev)
> if (fw->size != expected_size) {
> dev_err(dev, "File size mismatch (expected %u, actual %zu). Corrupted IFS image.\n",
> expected_size, fw->size);
> - return -EINVAL;
> + ret = -EINVAL;
> + goto release;
> }
>
> ret = image_sanity_check(dev, (struct microcode_header_intel *)fw->data);
>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
--
i.
next prev parent reply other threads:[~2024-01-25 13:04 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-25 8:22 [PATCH 0/5] Miscelleanous fixes and improvements to Infield Scan Ashok Raj
2024-01-25 8:22 ` [PATCH 1/5] platform/x86/intel/ifs: Call release_firmware() when handling errors Ashok Raj
2024-01-25 13:04 ` Ilpo Järvinen [this message]
2024-01-26 19:15 ` Hans de Goede
2024-01-29 3:55 ` Pengfei Xu
2024-01-29 8:39 ` Hans de Goede
2024-01-25 8:22 ` [PATCH 2/5] platform/x86/intel/ifs: Trace on all HT threads when executing a test Ashok Raj
2024-01-25 8:22 ` [PATCH 3/5] platform/x86/intel/ifs: Add current batch number to trace output Ashok Raj
2024-01-25 8:22 ` [PATCH 4/5] platform/x86/intel/ifs: Replace the exit rendezvous with an entry rendezvous for ARRAY_BIST Ashok Raj
2024-01-25 8:22 ` [PATCH 5/5] platform/x86/intel/ifs: Add an entry rendezvous for SAF Ashok Raj
2024-01-31 10:29 ` [PATCH 0/5] Miscelleanous fixes and improvements to Infield Scan Ilpo Järvinen
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=497dbb51-e583-374f-b31a-e14f1253c93f@linux.intel.com \
--to=ilpo.jarvinen@linux.intel.com \
--cc=ashok.raj@intel.com \
--cc=hdegoede@redhat.com \
--cc=jithu.joseph@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=markgross@kernel.org \
--cc=patches@lists.linux.dev \
--cc=pengfei.xu@intel.com \
--cc=platform-driver-x86@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=tony.luck@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