mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jarkko Sakkinen <jarkko@kernel.org>
To: Takashi Iwai <tiwai@suse.de>
Cc: Peter Huewe <peterhuewe@gmx.de>, Jason Gunthorpe <jgg@ziepe.ca>,
	linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] tpm: acpi: Fix memory leak at tpm_read_log_acpi() error path
Date: Mon, 9 Nov 2026 17:26:56 +0200	[thread overview]
Message-ID: <avHmQBA4s7yVwVl7@kernel.org> (raw)
In-Reply-To: <avHl-WoBP73QjInD@kernel.org>

On Mon, Nov 09, 2026 at 05:25:49PM +0200, Jarkko Sakkinen wrote:
> On Mon, Nov 09, 2026 at 09:25:24AM +0100, Takashi Iwai wrote:
> > When devm_add_action() returns an error, we do NULL-clear
> > log->bios_event_log unnecessarily before calling tpm_bios_log_free(),
> > and it would lead to a memory leak of the allocated log buffer.
> 
> I don't understand this. "NULL-clear" is gibberish when the actual
> bug is just spurious clear of log->bios_event_log. Also we are not
> doing anything we are not computers.

I.e. in place of "we", use the name of the function and this should
be good. The fix itself is legit.

Br, Jarkko

      reply	other threads:[~2026-11-09 15:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-09  8:25 Takashi Iwai
2026-11-09 15:25 ` Jarkko Sakkinen
2026-11-09 15:26   ` Jarkko Sakkinen [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=avHmQBA4s7yVwVl7@kernel.org \
    --to=jarkko@kernel.org \
    --cc=jgg@ziepe.ca \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterhuewe@gmx.de \
    --cc=tiwai@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

all inboxes | Powered by JetHome®