[PATCH 0/2][SRU][OEM-6.1][OEM-6.0] A deadlock issue in scsi rescan task while resuming from S3

AceLan Kao acelan.kao at canonical.com
Fri May 5 09:09:39 UTC 2023


From: "Chia-Lin Kao (AceLan)" <acelan.kao at canonical.com>

BugLink: https://launchpad.net/bugs/2018566

[Impact]
During the S3 stress test, the system sometimes hangs when resuming. This
is due to the SCSI rescan task being unable to acquire the mutex lock
during the resumption from S3. The mutex lock has already been acquired by
EH and is waiting for the device to be ready for a rescan. Unfortunately,
the mutex lock is never released by either party, leading to a deadlock.

[Fix]
Kaiheng submitted a patch to fix this issue which defers the rescan if the
disk is still suspended so the resume process of the disk device can proceed.
https://patchwork.ozlabs.org/project/linux-ide/patch/20230502150435.423770-2-kai.heng.feng@canonical.com/

Since the patch has not been accepted by the upstream yet, so submit it to
the OEM kernel for now.

[Test]
Verified on the machines by me and ODM.

[Where problems could occur]
It only defers the rescan task, and should not have any impact to current systems.

Kai-Heng Feng (2):
  UBUNTU: SAUCE: PM: suspend: Define pm_suspend_target_state
  UBUNTU: SAUCE: ata: libata: Defer rescan on suspended device

 drivers/ata/libata-core.c   | 11 +++++++++++
 drivers/ata/libata-eh.c     | 11 +++++++++--
 drivers/base/power/wakeup.c |  5 -----
 include/linux/libata.h      |  1 +
 include/linux/suspend.h     |  4 +++-
 5 files changed, 24 insertions(+), 8 deletions(-)

-- 
2.34.1




More information about the kernel-team mailing list