live-patching.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Miroslav Benes <mbenes@suse.cz>
To: Josh Poimboeuf <jpoimboe@kernel.org>
Cc: Shihao Ren <rsh15355756202@163.com>,
	pmladek@suse.com, jikos@kernel.org,  joe.lawrence@redhat.com,
	live-patching@vger.kernel.org,  linux-kernel@vger.kernel.org
Subject: Re: [PATCH] livepatch/klp-build: Fix wrong index in error cleanup loop
Date: Fri, 28 Aug 2026 09:19:00 +0200 (CEST)	[thread overview]
Message-ID: <alpine.LSU.2.21.2608280918230.9476@pobox.suse.cz> (raw)
In-Reply-To: <apC-XG-jCLJHvcil@jpoimboe>

On Thu, 27 Aug 2026, Josh Poimboeuf wrote:

> On Mon, Aug 24, 2026 at 03:42:46PM +0200, Miroslav Benes wrote:
> > On Thu, 2 Jul 2026, Petr Mladek wrote:
> > 
> > > On Wed 2026-07-01 14:06:55, Shihao Ren wrote:
> > > > In the funcs allocation failure path, the cleanup loop iterates with
> > > > 'j' but frees objs[i].funcs, which uses the outer loop index 'i'
> > > > instead of the loop variable 'j'. As a result the just-failed (NULL)
> > > > entry is freed repeatedly, while the funcs buffers already allocated
> > > > for objs[0..i-1] are leaked.
> > > > 
> > > > Use objs[j].funcs so the previously allocated entries are correctly
> > > > released.
> > > > 
> > > > Fixes: 59adee07b568 ("livepatch/klp-build: Add stub init code for livepatch modules")
> > > > Signed-off-by: Shihao Ren <rsh15355756202@163.com>
> > > 
> > > Great catch!
> > > 
> > > Reviewed-by: Petr Mladek <pmladek@suse.com>
> > > 
> > > I assume that Josh would take this together with other klp-build
> > > related changes.
> > 
> > I do not see it merged yet. Josh, could you take it, please?
> 
> Sorry, I missed seeing this one, but I do have an identical patch
> already queued:
> 
>   https://lore.kernel.org/aocdq0hr_iQTimG0@jpoimboe

Ok, thanks. I did not get that far in my INBOX after holiday yet :/

Miroslav

      reply	other threads:[~2026-08-28  7:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-01  6:06 [PATCH] livepatch/klp-build: Fix wrong index in error cleanup loop Shihao Ren
2026-07-01 11:16 ` Miroslav Benes
2026-07-02  8:53 ` Petr Mladek
2026-08-24 13:42   ` Miroslav Benes
2026-08-27 22:49     ` Josh Poimboeuf
2026-08-28  7:19       ` Miroslav Benes [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=alpine.LSU.2.21.2608280918230.9476@pobox.suse.cz \
    --to=mbenes@suse.cz \
    --cc=jikos@kernel.org \
    --cc=joe.lawrence@redhat.com \
    --cc=jpoimboe@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=live-patching@vger.kernel.org \
    --cc=pmladek@suse.com \
    --cc=rsh15355756202@163.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;
as well as URLs for NNTP newsgroup(s).