linux/drivers/scsi/ufs
Bart Van Assche 3489c34bd0 scsi: ufs: Fix a kernel crash during shutdown
Fix the following kernel crash:

Unable to handle kernel paging request at virtual address ffffffc91e735000
Call trace:
 __queue_work+0x26c/0x624
 queue_work_on+0x6c/0xf0
 ufshcd_hold+0x12c/0x210
 __ufshcd_wl_suspend+0xc0/0x400
 ufshcd_wl_shutdown+0xb8/0xcc
 device_shutdown+0x184/0x224
 kernel_restart+0x4c/0x124
 __arm64_sys_reboot+0x194/0x264
 el0_svc_common+0xc8/0x1d4
 do_el0_svc+0x30/0x8c
 el0_svc+0x20/0x30
 el0_sync_handler+0x84/0xe4
 el0_sync+0x1bc/0x1c0

Fix this crash by ungating the clock before destroying the work queue on
which clock gating work is queued.

Link: https://lore.kernel.org/r/20211203231950.193369-15-bvanassche@acm.org
Tested-by: Bean Huo <beanhuo@micron.com>
Reviewed-by: Bean Huo <beanhuo@micron.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2021-12-06 22:30:34 -05:00
..
cdns-pltfrm.c scsi: ufs: Reduce power management code duplication 2021-08-02 21:43:57 -04:00
Kconfig scsi: ufs: Fix double space in SCSI_UFS_HWMON description 2021-11-18 22:26:59 -05:00
Makefile scsi: ufs: core: Probe for temperature notification support 2021-09-22 00:07:42 -04:00
tc-dwc-g210-pci.c scsi: ufs: Fix race conditions related to driver data 2021-12-06 22:30:33 -05:00
tc-dwc-g210-pltfrm.c scsi: ufs: Reduce power management code duplication 2021-08-02 21:43:57 -04:00
tc-dwc-g210.c
tc-dwc-g210.h
ti-j721e-ufs.c
ufs_bsg.c scsi: ufs: core: Enable power management for wlun 2021-05-10 22:28:20 -04:00
ufs_bsg.h
ufs_quirks.h scsi: ufs: core: Add L2P entry swap quirk for Micron UFS 2021-08-05 23:21:08 -04:00
ufs-debugfs.c scsi: ufs: core: Add debugfs attributes for triggering the UFS EH 2021-10-26 23:24:50 -04:00
ufs-debugfs.h scsi: ufs: core: Enable power management for wlun 2021-05-10 22:28:20 -04:00
ufs-exynos.c scsi: ufs: Rename a function argument 2021-12-06 22:30:32 -05:00
ufs-exynos.h scsi: ufs: ufs-exynos: Support ExynosAuto v9 UFS 2021-10-27 23:10:12 -04:00
ufs-fault-injection.c scsi: ufs: Add fault injection support 2021-08-03 07:27:42 -04:00
ufs-fault-injection.h scsi: ufs: Add fault injection support 2021-08-03 07:27:42 -04:00
ufs-hisi.c scsi: ufs: Let devices remain runtime suspended during system suspend 2021-11-29 22:37:04 -05:00
ufs-hisi.h scsi: ufs: ufs-hisi: Use device parameter initialization function 2020-11-17 01:03:18 -05:00
ufs-hwmon.c scsi: ufs: core: Add temperature notification exception handling 2021-09-22 00:07:42 -04:00
ufs-mediatek-trace.h scsi: ufs-mediatek: Use correct path to fix compile error 2020-12-09 12:00:26 -05:00
ufs-mediatek.c scsi: ufs: mediatek: Avoid sched_clock() misuse 2021-10-20 23:09:58 -04:00
ufs-mediatek.h scsi: ufs: ufs-mediatek: Introduce default delay for reference clock 2021-10-18 22:38:35 -04:00
ufs-qcom-ice.c
ufs-qcom.c scsi: ufs: mediatek: Support vops pre suspend to disable auto-hibern8 2021-10-12 13:41:01 -04:00
ufs-qcom.h scsi: ufs: ufs-qcom: Use device parameter initialization function 2020-11-17 01:03:18 -05:00
ufs-sysfs.c scsi: ufs: core: Add lu_enable sysfs node 2021-08-05 23:21:13 -04:00
ufs-sysfs.h
ufs.h scsi: ufs: core: Probe for temperature notification support 2021-09-22 00:07:42 -04:00
ufshcd-crypto.c blk-crypto: rename blk_keyslot_manager to blk_crypto_profile 2021-10-21 10:49:32 -06:00
ufshcd-crypto.h blk-crypto: rename blk_keyslot_manager to blk_crypto_profile 2021-10-21 10:49:32 -06:00
ufshcd-dwc.c scsi: ufs-dwc: Use phy_initialization helper 2020-12-07 18:00:06 -05:00
ufshcd-dwc.h
ufshcd-pci.c scsi: ufs: Fix race conditions related to driver data 2021-12-06 22:30:33 -05:00
ufshcd-pltfrm.c scsi: ufs: Fix race conditions related to driver data 2021-12-06 22:30:33 -05:00
ufshcd-pltfrm.h scsi: ufs: Reduce power management code duplication 2021-08-02 21:43:57 -04:00
ufshcd.c scsi: ufs: Fix a kernel crash during shutdown 2021-12-06 22:30:34 -05:00
ufshcd.h scsi: ufs: Remove hba->cmd_queue 2021-12-06 22:30:33 -05:00
ufshci-dwc.h
ufshci.h scsi: ufs: core: Micro-optimize ufshcd_map_sg() 2021-10-26 23:24:50 -04:00
ufshpb.c scsi: Remove superfluous #include <linux/async.h> directives 2021-11-29 23:02:15 -05:00
ufshpb.h scsi: ufs: ufshpb: Properly handle max-single-cmd 2021-11-03 21:51:56 -04:00
unipro.h scsi: ufs: Add enums for UniPro version higher than 1.6 2020-11-10 23:03:18 -05:00