[PATCH] HACK: potential fix for v6.11-rc1 scsi-sd regression
Luca Coelho
luciano.coelho at intel.com
Thu Aug 1 03:12:58 UTC 2024
Signed-off-by: Luca Coelho <luciano.coelho at intel.com>
---
drivers/scsi/sd.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index adeaa8ab9951..2751775ae532 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -3753,7 +3753,6 @@ static int sd_revalidate_disk(struct gendisk *disk)
sd_read_block_limits_ext(sdkp);
sd_read_block_characteristics(sdkp, &lim);
sd_zbc_read_zones(sdkp, &lim, buffer);
- sd_read_cpr(sdkp);
}
sd_print_capacity(sdkp, old_capacity);
@@ -3808,6 +3807,13 @@ static int sd_revalidate_disk(struct gendisk *disk)
if (err)
return err;
+ /*
+ * Query concurrent positioning ranges after releasing the limits_lock
+ * to avoid dead lock with sysfs_dir_lock and sysfs_lock.
+ */
+ if (sdkp->media_present && scsi_device_supports_vpd(sdp))
+ sd_read_cpr(sdkp);
+
/*
* For a zoned drive, revalidating the zones can be done only once
* the gendisk capacity is set. So if this fails, set back the gendisk
--
2.39.2
More information about the Intel-gfx-trybot
mailing list