From nobody Tue Oct 7 11:50:37 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 D973F27F749; Thu, 10 Jul 2025 13:12:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752153173; cv=none; b=Y0jE/7FRzpbhaOOGG2XUKQt999IFcD7CCdZ5YvcN8La7KDRqw5eAWvvNtaYA1Ss1biA8ZTj7Dxt3CUa4ANngm8WkL61FZWOK5aESlf4BS8OYKh3+YuMvzu7OIRJ/uQJd0eCS9xfQpMsDEUhLoW8Iz0+HXJLXEKSBGuwjJt48lMc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752153173; c=relaxed/simple; bh=q9abc7oDZLcrtsMuNt1PO9GtWY5Cpp2InagfHvwx58A=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=vGwN0N/Sjl0jiPQaKhzR/G+CB4P6i2jkuU/b/gDNO5TYHN6DQl9CvfFPKdSu1eWAIWbOF44Yl18lCugnF+cK7or5i17ybOrufx4SwcTOuVyWy5Y0wPErM3St/oUqF64ShX4RtEefs8g1m/WtTr5XHwR0uwHxdHK706IdQkZw7jo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=t4eB/E96; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="t4eB/E96" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DC2B7C4CEE3; Thu, 10 Jul 2025 13:12:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1752153172; bh=q9abc7oDZLcrtsMuNt1PO9GtWY5Cpp2InagfHvwx58A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=t4eB/E96oPfoYrzKEEkI+GgqjVDfIsE8xFcwhS0OUm/BBiiSk2RYf2RUf0N9rFBqa cyeWTdcEiHkGjmWnAQ4+PqdIss7v/rC5faUUdtvgrSBKIfUzFHlXD/BLb1Y5P+Iwtn Dm+9JdtsGuzG2cBgU5Sx+UJ2YyTLfwDlmE+nYHCVknsIVXg+YOR4SdyywciLOShV6j FsqIzluUatlkHPWYrfk6D/MsKAn65jl9ezdWI1S9csY1M6VB/f/Tnsa24lSdojVjJX 5kG38VgKR0AoFKfy6Z0dsL6F03PhwxR3jgNJd/BI/HEus9uKShLrl6AkZ93Smo2OkV SzYf97dkstYHA== From: "Rafael J. Wysocki" To: kexec@lists.infradead.org Cc: LKML , Linux PM , Andrew Morton , Baoquan He , Mario Limonciello , David Woodhouse Subject: [PATCH v1 1/2] kexec_core: Fix error code path in the KEXEC_JUMP flow Date: Thu, 10 Jul 2025 15:10:41 +0200 Message-ID: <2396879.ElGaqSPkdT@rjwysocki.net> Organization: Linux Kernel Development In-Reply-To: <5046396.31r3eYUQgx@rjwysocki.net> References: <5046396.31r3eYUQgx@rjwysocki.net> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Rafael J. Wysocki If dpm_suspend_start() fails, dpm_resume_end() must be called to recover devices whose suspend callbacks have been called, but this does not happen in the KEXEC_JUMP flow's error path due to a confused goto target label. Address this by using the correct target label in the goto statement in question. Fixes: 2965faa5e03d ("kexec: split kexec_load syscall from kexec core code") Signed-off-by: Rafael J. Wysocki Acked-by: Baoquan He --- kernel/kexec_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/kernel/kexec_core.c +++ b/kernel/kexec_core.c @@ -1080,7 +1080,7 @@ console_suspend_all(); error =3D dpm_suspend_start(PMSG_FREEZE); if (error) - goto Resume_console; + goto Resume_devices; /* * dpm_suspend_end() must be called after dpm_suspend_start() * to complete the transition, like in the hibernation flows