Skip to content

Commit 27f329b

Browse files
ptr324smb49
authored andcommitted
scsi: ufs: core: Fix another deadlock during RTC update
BugLink: https://bugs.launchpad.net/bugs/2099996 [ Upstream commit cb7e509c4e0197f63717fee54fb41c4990ba8d3a ] If ufshcd_rtc_work calls ufshcd_rpm_put_sync() and the pm's usage_count is 0, we will enter the runtime suspend callback. However, the runtime suspend callback will wait to flush ufshcd_rtc_work, causing a deadlock. Replace ufshcd_rpm_put_sync() with ufshcd_rpm_put() to avoid the deadlock. Fixes: 6bf999e ("scsi: ufs: core: Add UFS RTC support") Cc: [email protected] #6.11.x Signed-off-by: Peter Wang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Bart Van Assche <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]> Signed-off-by: Sasha Levin <[email protected]> CVE-2024-53053 Signed-off-by: Koichiro Den <[email protected]> Signed-off-by: Stefan Bader <[email protected]>
1 parent 3069664 commit 27f329b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/ufs/core/ufshcd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8236,7 +8236,7 @@ static void ufshcd_update_rtc(struct ufs_hba *hba)
82368236

82378237
err = ufshcd_query_attr(hba, UPIU_QUERY_OPCODE_WRITE_ATTR, QUERY_ATTR_IDN_SECONDS_PASSED,
82388238
0, 0, &val);
8239-
ufshcd_rpm_put_sync(hba);
8239+
ufshcd_rpm_put(hba);
82408240

82418241
if (err)
82428242
dev_err(hba->dev, "%s: Failed to update rtc %d\n", __func__, err);

0 commit comments

Comments
 (0)