mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Amadeusz Sławiński" <amadeuszx.slawinski@linux.intel.com>
To: Gaosheng Cui <cuigaosheng1@huawei.com>,
	mcgrof@kernel.org, russ.weight@linux.dev, dakr@redhat.com,
	gregkh@linuxfoundation.org, rafael@kernel.org,
	cezary.rojewski@intel.com, wangweiyang2@huawei.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH -next] firmware_loader: Fix possible resource leak in fw_log_firmware_info()
Date: Thu, 24 Oct 2024 09:50:16 +0200	[thread overview]
Message-ID: <a9009cec-ce43-4288-98bf-1b6f216131c3@linux.intel.com> (raw)
In-Reply-To: <20241016110335.3677924-1-cuigaosheng1@huawei.com>

On 10/16/2024 1:03 PM, Gaosheng Cui wrote:
> The alg instance should be released under the exception path, otherwise
> there may be resource leak here.
> 
> To mitigate this, free the alg instance with crypto_free_shash when kmalloc
> fails.
> 
> Fixes: 02fe26f25325 ("firmware_loader: Add debug message with checksum for FW file")
> Signed-off-by: Gaosheng Cui <cuigaosheng1@huawei.com>
> ---

Makes sense, thanks!

Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>

      parent reply	other threads:[~2024-10-24  7:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-16 11:03 Gaosheng Cui
2024-10-16 15:12 ` Greg KH
2024-10-23 20:49 ` Russ Weight
2024-10-24  7:50 ` Amadeusz Sławiński [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=a9009cec-ce43-4288-98bf-1b6f216131c3@linux.intel.com \
    --to=amadeuszx.slawinski@linux.intel.com \
    --cc=cezary.rojewski@intel.com \
    --cc=cuigaosheng1@huawei.com \
    --cc=dakr@redhat.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mcgrof@kernel.org \
    --cc=rafael@kernel.org \
    --cc=russ.weight@linux.dev \
    --cc=wangweiyang2@huawei.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

Powered by JetHome