linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Breno Leitao <leitao@debian.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Alexander Graf <graf@amazon.com>, Mike Rapoport <rppt@kernel.org>,
	 Pasha Tatashin <pasha.tatashin@soleen.com>,
	Pratyush Yadav <pratyush@kernel.org>,
	kexec@lists.infradead.org,  linux-mm@kvack.org,
	linux-kernel@vger.kernel.org, kernel-team@meta.com
Subject: Re: [PATCH] kho: fix error handling in kho_add_subtree()
Date: Fri, 10 Apr 2026 01:52:08 -0700	[thread overview]
Message-ID: <adi51hPc8n5ITHbU@gmail.com> (raw)
In-Reply-To: <20260409150802.fd7b91c9beea6abe4e8a63c2@linux-foundation.org>

On Thu, Apr 09, 2026 at 03:08:02PM -0700, Andrew Morton wrote:
> On Tue, 07 Apr 2026 10:01:47 -0700 Breno Leitao <leitao@debian.org> wrote:
>
> > Fix two error handling issues in kho_add_subtree(), where it doesn't
> > handle the error path correctly.
> >
> > 1. If fdt_setprop() fails after the subnode has been created, the
> >    subnode is not removed. This leaves an incomplete node in the FDT
> >    (missing "preserved-data" or "blob-size" properties).
> >
> > 2. The fdt_setprop() return value (an FDT error code) is stored
> >    directly in err and returned to the caller, which expects -errno.
> >
> > Fix both by storing fdt_setprop() results in fdt_err, jumping to a new
> > out_del_node label that removes the subnode on failure, and only setting
> > err = 0 on the success path, otherwise returning -ENOMEM (instead of
> > FDT_ERR_ errors that would come from fdt_setprop).
> >
> > Fixes: 3dc92c311498 ("kexec: add Kexec HandOver (KHO) generation helpers")
>
> v6.16.
>
> > Suggested-by: Pratyush Yadav <pratyush@kernel.org>
> > Signed-off-by: Breno Leitao <leitao@debian.org>
> > ---
> >  kernel/liveupdate/kexec_handover.c | 21 +++++++++++++--------
> >  1 file changed, 13 insertions(+), 8 deletions(-)
>
> Do -stable kernels want this?
>
> Changelog is missing a description of userspace-visible effects, So I
> (and others) can't tell!

Agreed. I'll improve the changelog to describe the user-visible impact
and CC stable in v2.



      reply	other threads:[~2026-04-10  8:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-07 17:01 Breno Leitao
2026-04-09 14:25 ` Mike Rapoport
2026-04-09 22:08 ` Andrew Morton
2026-04-10  8:52   ` Breno Leitao [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=adi51hPc8n5ITHbU@gmail.com \
    --to=leitao@debian.org \
    --cc=akpm@linux-foundation.org \
    --cc=graf@amazon.com \
    --cc=kernel-team@meta.com \
    --cc=kexec@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=pasha.tatashin@soleen.com \
    --cc=pratyush@kernel.org \
    --cc=rppt@kernel.org \
    /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