Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp631034ybj; Tue, 5 May 2020 05:12:46 -0700 (PDT) X-Google-Smtp-Source: APiQypLZzFUGaLp8/TKFGkNvmKT50e1svTV1cgfxQvLpWJTz+q5HmuxGCW6riSSF/4hPIzELjZ8w X-Received: by 2002:a05:6402:22cd:: with SMTP id dm13mr2404615edb.56.1588680766541; Tue, 05 May 2020 05:12:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588680766; cv=none; d=google.com; s=arc-20160816; b=wuLSp/nD0QCn+/52d47XqKBA5O9HpCPQnrVcDqfx2/hY+j9lJENhDn4sAYppxLZa7H Jw7ciQLN0LLQZDBG9bBux9fzbeUrLvKwOObwjvJfkLBXkDun3tWfuWc7rxtKtP5ZFmUj NahS3piXz2BLDw2sv7oGVGlnqpN6pMWRYdYNtVhEOQuY3kt72KPecwDbKok7pOc1gDqa JGSkJ1ufySsVC6cb7b6jDyvk7gyvEkFnXnpCzqwFMSh+WvQVA+qnVTiHim8p4pHp0uYb XB8zZwaypvpmeBzAI9cFeFy1JWQgs6sHF9SyeNQHR+NHHh6Jira2pTAfsnjS89QQnN8+ Pkbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=KtGiqyWp43ceHyg/r2pkVmkiskn0CHqHAqJsdnwTjeM=; b=EBJxnwh6SBGHpJ1YUA2BsJe0zlrUlcrP4IQsxhBIHTZ6LWBUcE2hvasA1yNFTKgNe9 v80E63sUiCPLhoBROLDDmbkhszYzCuT9ED0O5ntN3tK6s+0g3MeIwSYewHwmgv26EDzS VTttzvhviKCJnAHsSGTYziyj7apYtPO1IKk+czKUldjpCF5TFX/QFAAtgTn4TdUxKVUB Gt7UdWdXqxv5Q5bsn/6fVkneYIdbQqlmowGx2imMsMOB6cXydrdmeSlaQpfuX/x8Xfb4 wtXo4Rw18DxWI185MwmJTWtIq6wDledP4YDRNJvVuBRw9sxxf2jZWFxgDY9nCjCgLpOv 9/dw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d9si1004475edx.458.2020.05.05.05.12.23; Tue, 05 May 2020 05:12:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728853AbgEEMJ7 (ORCPT + 99 others); Tue, 5 May 2020 08:09:59 -0400 Received: from jabberwock.ucw.cz ([46.255.230.98]:39056 "EHLO jabberwock.ucw.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728660AbgEEMJ7 (ORCPT ); Tue, 5 May 2020 08:09:59 -0400 Received: by jabberwock.ucw.cz (Postfix, from userid 1017) id 3ABF11C022C; Tue, 5 May 2020 14:09:57 +0200 (CEST) Date: Tue, 5 May 2020 14:09:56 +0200 From: Pavel Machek To: Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, Dexuan Cui , "Rafael J. Wysocki" Subject: Re: [PATCH 4.19 11/37] PM: hibernate: Freeze kernel threads in software_resume() Message-ID: <20200505120956.GA28722@amd> References: <20200504165448.264746645@linuxfoundation.org> <20200504165449.741334238@linuxfoundation.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="tThc/1wpZn/ma/RB" Content-Disposition: inline In-Reply-To: <20200504165449.741334238@linuxfoundation.org> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --tThc/1wpZn/ma/RB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > commit 2351f8d295ed63393190e39c2f7c1fee1a80578f upstream. >=20 > Currently the kernel threads are not frozen in software_resume(), so > between dpm_suspend_start(PMSG_QUIESCE) and resume_target_kernel(), > system_freezable_power_efficient_wq can still try to submit SCSI > commands and this can cause a panic since the low level SCSI driver > (e.g. hv_storvsc) has quiesced the SCSI adapter and can not accept > any SCSI commands: https://lkml.org/lkml/2020/4/10/47 >=20 > At first I posted a fix (https://lkml.org/lkml/2020/4/21/1318) trying > to resolve the issue from hv_storvsc, but with the help of > Bart Van Assche, I realized it's better to fix software_resume(), > since this looks like a generic issue, not only pertaining to SCSI. I believe it is too soon to merge this into stable. It is rather big hammer. Yes, it is right thing to do. But I'd wait for 5.7 to be released before merging it to stable. It needs some testing and it did not get any. Best regards, Pavel > Cc: All applicable > Signed-off-by: Dexuan Cui > Signed-off-by: Rafael J. Wysocki > Signed-off-by: Greg Kroah-Hartman >=20 > --- > kernel/power/hibernate.c | 7 +++++++ > 1 file changed, 7 insertions(+) >=20 > --- a/kernel/power/hibernate.c > +++ b/kernel/power/hibernate.c > @@ -901,6 +901,13 @@ static int software_resume(void) > error =3D freeze_processes(); > if (error) > goto Close_Finish; > + > + error =3D freeze_kernel_threads(); > + if (error) { > + thaw_processes(); > + goto Close_Finish; > + } > + > error =3D load_image_and_restore(); > thaw_processes(); > Finish: >=20 --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --tThc/1wpZn/ma/RB Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAl6xV5QACgkQMOfwapXb+vLdngCfWXiRv6+x3tG+LpFhumaMbyZq ek4An1F4jv81BEgOsgETKkkyu5eN7pM9 =FCx7 -----END PGP SIGNATURE----- --tThc/1wpZn/ma/RB--