Message ID | CAPm50aJ_aW4RmL3_n=5CpGL9D3dXENenFuo5QG0Q2DJO9Gv_1w@mail.gmail.com (mailing list archive) |
---|---|
State | Deferred |
Headers | show |
Series | scsi/ipr: keep the order of locks | expand |
> As shown above, there are two lock acquisition order changes. At the > same time, when ipr_device_reset is executed, the lock hrrq->_lock > does not need to be held. Please make sure to copy the driver maintainer when submitting patches: $ ./scripts/get_maintainer.pl drivers/scsi/ipr.c | head -1 Brian King <brking@us.ibm.com> (supporter:IBM Power Linux RAID adapter)
On Sat, Oct 1, 2022 at 5:33 PM Martin K. Petersen <martin.petersen@oracle.com> wrote: > > > > As shown above, there are two lock acquisition order changes. At the > > same time, when ipr_device_reset is executed, the lock hrrq->_lock > > does not need to be held. > > Please make sure to copy the driver maintainer when submitting patches: > > $ ./scripts/get_maintainer.pl drivers/scsi/ipr.c | head -1 > Brian King <brking@us.ibm.com> (supporter:IBM Power Linux RAID adapter) > > -- > Martin K. Petersen Oracle Linux Engineering
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c index 9d01a3e3c26a..6ca987dda397 100644 --- a/drivers/scsi/ipr.c +++ b/drivers/scsi/ipr.c @@ -6837,7 +6837,9 @@ static void ipr_ata_post_internal(struct ata_queued_cmd *qc) spin_lock(&hrrq->_lock); list_for_each_entry(ipr_cmd, &hrrq->hrrq_pending_q, queue) { if (ipr_cmd->qc == qc) { + spin_unlock(&hrrq->_lock); ipr_device_reset(ioa_cfg, sata_port->res); + spin_lock(&hrrq->_lock); break; }