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 91BFD33711C; Fri, 17 Oct 2025 15:07:22 +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=1760713642; cv=none; b=ii4YU6ro2EtkZfTOd7aRSZc8ya7v0LAyYL4TvQ7xzRgq2B/TMJqqkLF4Hhd97oqodRUgnXK6b/2ae6t6a0ElxXNyB41taleDSbvhz3eK/w13/nyNnGs0Qdi396rb8W7CA10U1iBBs53h5OghkHkY5DuLVfjNIeZqp5OKm1mENbs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760713642; c=relaxed/simple; bh=8Nv8PBKdCZ/hcOYKbN+Uy1tGDye53o1F5ecwryY0pCw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=tm44x5UGN2zZx7mSzBlkipSvr7Vji8V+sUUkkjwiamV/qtKA4fyeUc4PJL0+cOzsAV4XeY+2wtcc0trzbr27dOKEgfI7Sm+RWPtm2LfJzmPyfrhq/cqryjPJWT+9TxgIgvmQsbIWeFyCWdBF4C0oftRyuXGsjx4DXwMaDB1jYP8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=aFLYVR1a; 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="aFLYVR1a" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A29ACC4CEF9; Fri, 17 Oct 2025 15:07:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1760713642; bh=8Nv8PBKdCZ/hcOYKbN+Uy1tGDye53o1F5ecwryY0pCw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aFLYVR1aT0ISycJ4joxh/Uz86L7wx8MKebjCgWNURjAGc9vYXMSLEFEnu3n4ZtmYp BSx+I+T1zF4SzCoIjEVsAFH/Us97nwqWHR0vDXETjyb4I2F4TvaeLJYRlAQzNzIS9F WMMtR9vgZJ1t8FKc+ovie99iDAP22l+8zjLVgZR8= 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 6.6 068/201] xen/manage: Fix suspend error path Date: Fri, 17 Oct 2025 16:52:09 +0200 Message-ID: <20251017145137.250496195@linuxfoundation.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251017145134.710337454@linuxfoundation.org> References: <20251017145134.710337454@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 6.6-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: