From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from stravinsky.debian.org (stravinsky.debian.org [82.195.75.108]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 42BD73AE188 for ; Fri, 10 Apr 2026 08:52:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=82.195.75.108 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775811143; cv=none; b=DR+RdHm8HaAo+YgVHkH+iDkrsCGmaTWtAUIjKUIF3Yp1pBuzhXJNC3a15jJtF4c94+m3dSVAk77we00v7QGq5Xg8heXpNbDqZ2yzM3gDXPbESmpwb0k4wU9it69gpKDCEjRpkDJb/kgVY3IhQAA3y0VlhaBU3sO7NAW4zNUmjuM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775811143; c=relaxed/simple; bh=yrD5xElINFeHbFSpqMmdLMwO89YrX/Loui0oYfQ/jTo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=E3v7t6+4Pck2+xlbbrYvhfhLcCjw/yTIyQfZZEYOLJARXzxq9+wiCFhkyd485e521sobauns6I/IKh1STKk6RvNuxbdtzKG1ImCYVSrFDPkCkVBxkAJIycU3ocfGZTxISmNQW8+jKKSHQKFCz+XUJWM1ZjGD53x+FxZ8dN3OHak= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=debian.org; spf=none smtp.mailfrom=debian.org; dkim=pass (2048-bit key) header.d=debian.org header.i=@debian.org header.b=jdzNlHbJ; arc=none smtp.client-ip=82.195.75.108 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=debian.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=debian.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=debian.org header.i=@debian.org header.b="jdzNlHbJ" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debian.org; s=smtpauto.stravinsky; h=X-Debian-User:In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=0eX6xcryDUIa7Vylx/0UzTyLSmyeGAUYHjEMq2Mi0C0=; b=jdzNlHbJtZA4YfAYyP5O25FLE4 wKMHbefxjS0W6vs98qdeJa7V4gHj25FxGt5RkcNyejrww3iujsYvJedlbpghLpIyJXt6yg92o7HjH ejtUgep8gK+7Kk5Ir1vy3lSwOLbNk/SZIIhe0qaZa6nxv8sGiP/m5p16Zc2elgg5mOhuFOpsJ2xJq 8fsQMLPXtU31MF2boEItGD0v7RZ5TBCYFxWx3WYHawnxPqIXGBH2VOXy4DPBqJRWvbROvMjl2i9Ey 8XPy0a51PJuJDlGFP/Nt/gxjYLkfj5f96kCChp45u7g/wnhyg7uKJsfQmAzr6r5HSz0WtHVGp9hnW Z2ukoSlw==; Received: from authenticated user by stravinsky.debian.org with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) (envelope-from ) id 1wB7b2-009rYK-2Y; Fri, 10 Apr 2026 08:52:13 +0000 Date: Fri, 10 Apr 2026 01:52:08 -0700 From: Breno Leitao To: Andrew Morton Cc: Alexander Graf , Mike Rapoport , Pasha Tatashin , Pratyush Yadav , 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() Message-ID: References: <20260407-kho_fix_send-v1-1-b21977feb960@debian.org> <20260409150802.fd7b91c9beea6abe4e8a63c2@linux-foundation.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260409150802.fd7b91c9beea6abe4e8a63c2@linux-foundation.org> X-Debian-User: leitao On Thu, Apr 09, 2026 at 03:08:02PM -0700, Andrew Morton wrote: > On Tue, 07 Apr 2026 10:01:47 -0700 Breno Leitao 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 > > Signed-off-by: Breno Leitao > > --- > > 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.