mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paul Walmsley <pjw@kernel.org>
To: Zishun Yi <vulab@iscas.ac.cn>
Cc: Paul Walmsley <pjw@kernel.org>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	 Albert Ou <aou@eecs.berkeley.edu>,
	Alexandre Ghiti <alex@ghiti.fr>,  Kees Cook <kees@kernel.org>,
	Charlie Jenkins <charlie@rivosinc.com>,
	 linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] riscv: Fix memory leak in apply_relocate_add
Date: Wed, 25 Nov 2026 19:23:06 -0700 (MST)	[thread overview]
Message-ID: <a71f71b0-cdaa-4a14-55e2-6751881d3174@kernel.org> (raw)
In-Reply-To: <20260509115100.1879716-1-vulab@iscas.ac.cn>

On Sat, 9 May 2026, Zishun Yi wrote:

> The error path in apply_relocate_add() forgets to clean up the hashtable
> allocated at the beginning. But we should not use
> process_accumulated_relocations() as a cleanup function because some
> entries may be half-finished, and we cannot write incorrect values back
> to memory.
> 
> So, add cleanup_accumulated_relocations() for freeing all memory
> allocated in the error paths.

Thanks, queued for v7.5.


- Paul

      reply	other threads:[~2026-11-26  2:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-09 11:51 Zishun Yi
2026-11-26  2:23 ` Paul Walmsley [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=a71f71b0-cdaa-4a14-55e2-6751881d3174@kernel.org \
    --to=pjw@kernel.org \
    --cc=alex@ghiti.fr \
    --cc=aou@eecs.berkeley.edu \
    --cc=charlie@rivosinc.com \
    --cc=kees@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=palmer@dabbelt.com \
    --cc=vulab@iscas.ac.cn \
    /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®