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 759A430B527; Wed, 24 Sep 2025 16:24:51 +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=1758731091; cv=none; b=hTMzFv59WW9GDjql6FVvZ/Ldo+FUuswEaZmUCIWjeIKPnDjVBs/SCraZH6mY2ljKNYdSlV8pI6K2A6GlGfL6ASPf0pXRNPiEjgPc82BPHguRVbhTvjV87uBJy87U0VO59jeo6dtgi3m6N7WOvxsGCZH91vQyDS23NT+vaRVT7e8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758731091; c=relaxed/simple; bh=YDQXTVGOYTWva8EDpEwYuBr0RgnUKG4x/JRMrHY45WA=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=FYR1ruZzyxZjLK/CuI7057Sc7XU+UQLgD1tfctbnFFwz43Yh1EwimOAcO3b6dklvdW+gjx24Kfsng96A3cZ9SdnApO+9k4uikk8HZ6PAoen/P24ovJEf/PRQ/sJEJ06qNCAPA4A3ZAI181K5r62JAcFWpqmr5gDBYj0F0apyyac= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=rv4cs34/; 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="rv4cs34/" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 629B9C4CEE7; Wed, 24 Sep 2025 16:24:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1758731091; bh=YDQXTVGOYTWva8EDpEwYuBr0RgnUKG4x/JRMrHY45WA=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=rv4cs34/Qim8+evoo8ovxwouSo7ZGm3TI9LuDHjLvPp+9BNsAW86i5ETDW2z9zgbS t1jCkRpP3DUkUTDh/pkjL6LwA58lCk3aAbmFSPmU+fs70OS8Ja80hE4+ougHuXWAdx a8vFkzPrjcaO1uCAFBl37t3oCls0JUSZ0fuZn0l9N1EV531V1cnesgWHxjrkr1Hao8 r9rBsgtCOcl8qT7JR2g8zQ9SMGIHZ3sfQREqWI1i74rpoz0CvMeGDKWf/hLsg7wyNX lpAuzlykFkUGgmFZxwgjHgnBF312aBL288V6fwXbKcCgN4y/GEpY5+nI93lu030Fht FjJ6Fs4CbVVCA== Message-ID: <38a9db70-c6dc-40f0-a506-942fb799fa86@kernel.org> Date: Wed, 24 Sep 2025 11:24:49 -0500 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] xen: take system_transition_mutex on suspend To: =?UTF-8?B?SsO8cmdlbiBHcm/Dnw==?= , =?UTF-8?Q?Marek_Marczykowski-G=C3=B3recki?= , linux-kernel@vger.kernel.org Cc: stable@vger.kernel.org, Stefano Stabellini , Oleksandr Tyshchenko , "Rafael J. Wysocki" , "moderated list:XEN HYPERVISOR INTERFACE" References: <20250921162853.223116-1-marmarek@invisiblethingslab.com> Content-Language: en-US From: Mario Limonciello In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 9/22/25 1:06 AM, Jürgen Groß wrote: > On 21.09.25 18:28, Marek Marczykowski-Górecki wrote: >> Xen's do_suspend() calls dpm_suspend_start() without taking required >> system_transition_mutex. Since 12ffc3b1513eb moved the >> pm_restrict_gfp_mask() call, not taking that mutex results in a WARN. >> >> Take the mutex in do_suspend(), and use mutex_trylock() to follow >> how enter_state() does this. >> >> Suggested-by: Jürgen Groß >> Fixes: 12ffc3b1513eb "PM: Restrict swap use to later in the suspend >> sequence" >> Link: https://lore.kernel.org/xen-devel/aKiBJeqsYx_4Top5@mail-itl/ >> Signed-off-by: Marek Marczykowski-Górecki >> >> Cc: stable@vger.kernel.org # v6.16+ > > Reviewed-by: Juergen Gross > > > Juergen Reviewed-by: Mario Limonciello (AMD)