]> git.baikalelectronics.ru Git - kernel.git/commit
PM: hibernate: Freeze kernel threads in software_resume()
authorDexuan Cui <decui@microsoft.com>
Fri, 24 Apr 2020 03:40:16 +0000 (20:40 -0700)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 27 Apr 2020 08:30:30 +0000 (10:30 +0200)
commitaee10197cef427850c23693d4110a65626187631
tree622ce14dc022aa627eaae8cb15d68bc02fcf9330
parent955ac135a3b8737477606412c5bb1c4a86e4f4bf
PM: hibernate: Freeze kernel threads in software_resume()

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

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.

Cc: All applicable <stable@vger.kernel.org>
Signed-off-by: Dexuan Cui <decui@microsoft.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
kernel/power/hibernate.c