From mboxrd@z Thu Jan 1 00:00:00 1970 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 85A51322547; Mon, 27 Oct 2025 18:44:24 +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=1761590664; cv=none; b=pdrOhEeJwCRRKlMr0L6zGdpBJVpL68dLkpJf7T7FceoYXIH/+4JmJocvpoOXtYxSo72PHsnUIA5+VmZi3xH/xeaIShXL8hmSEzRDy0Te0XlJTW5NPCj4qjsztQF2pykSj4PUvEC3IUL0Z+a0GE078tjh++F+qL5Y4p+ylF9Eg0A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761590664; c=relaxed/simple; bh=Zs3aEbMU8xdFS+S6g1TKfawI1lA2C6q/kp8T/ygo6sc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=sEOfJ2QpCt5RXnQH9fv9LIAMdVw9dr/L/LpyGN9PczJSr58ua+mZzJx7QaN/hEcEuX3AdDyMSIw1p4KHva7xany20SPjUTkrmIQXmf3v1WSNEtn7SdwN84/0u8fgzA7FCcoUGYgtK2QCZwNwYUEsnmI6VEhVBu+lJ2XewujlKZ0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=VVq5qjoH; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="VVq5qjoH" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 113D3C4CEF1; Mon, 27 Oct 2025 18:44:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1761590664; bh=Zs3aEbMU8xdFS+S6g1TKfawI1lA2C6q/kp8T/ygo6sc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VVq5qjoHlm1tRvKcZ8jaM/Vn7eaJem0wI87ddQ3Z6lAmR020wuCDhLtQQO7FHSihq kCuQxsvsaK5Ni0Rdr+xCOIitykLEV/7iitglU6XWrDhaRRRGELp+9rG3STt2AMeegk +/T96zD4q12L4BSgS8Xy2HwknDcslBiNgrzFOZUQ= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Lukas Wunner , "Rafael J. Wysocki (Intel)" , Juergen Gross Subject: [PATCH 5.4 103/224] xen/manage: Fix suspend error path Date: Mon, 27 Oct 2025 19:34:09 +0100 Message-ID: <20251027183511.745411436@linuxfoundation.org> X-Mailer: git-send-email 2.51.1 In-Reply-To: <20251027183508.963233542@linuxfoundation.org> References: <20251027183508.963233542@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Lukas Wunner commit f770c3d858687252f1270265ba152d5c622e793f upstream. The device power management API has the following asymmetry: * dpm_suspend_start() does not clean up on failure (it requires a call to dpm_resume_end()) * dpm_suspend_end() does clean up on failure (it does not require a call to dpm_resume_start()) The asymmetry was introduced by commit d8f3de0d2412 ("Suspend-related patches for 2.6.27") in June 2008: It removed a call to device_resume() from device_suspend() (which was later renamed to dpm_suspend_start()). When Xen began using the device power management API in May 2008 with commit 0e91398f2a5d ("xen: implement save/restore"), the asymmetry did not yet exist. But since it was introduced, a call to dpm_resume_end() is missing in the error path of dpm_suspend_start(). Fix it. Fixes: d8f3de0d2412 ("Suspend-related patches for 2.6.27") Signed-off-by: Lukas Wunner Cc: stable@vger.kernel.org # v2.6.27 Reviewed-by: "Rafael J. Wysocki (Intel)" Signed-off-by: Juergen Gross Message-ID: <22453676d1ddcebbe81641bb68ddf587fee7e21e.1756990799.git.lukas@wunner.de> Signed-off-by: Greg Kroah-Hartman --- drivers/xen/manage.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/xen/manage.c +++ b/drivers/xen/manage.c @@ -116,7 +116,7 @@ static void do_suspend(void) err = dpm_suspend_start(PMSG_FREEZE); if (err) { pr_err("%s: dpm_suspend_start %d\n", __func__, err); - goto out_thaw; + goto out_resume_end; } printk(KERN_DEBUG "suspending xenstore...\n"); @@ -156,6 +156,7 @@ out_resume: else xs_suspend_cancel(); +out_resume_end: dpm_resume_end(si.cancelled ? PMSG_THAW : PMSG_RESTORE); out_thaw: