On 10/22/24 11:47 PM, Avri Altman wrote:
On 10/22/24 12:43 AM, Avri Altman wrote:
for_each_set_bit(tag, &issued, hba->nutmrs) {
struct request *req = hba->tmf_rqs[tag];
struct completion *c = req->end_io_data;
Would it be sufficient to hold the SCSI host lock around the
hba->outstanding_tasks read only? I don't think that the
for_each_set_bit() loop needs to be protected with the SCSI host lock.
>
That may cause concurrent access to tmf_rqs?
Right, the host_lock serializes hba->tmf_rqs[] accesses. Without having
analyzed whether or not removing locking from around the hba->tmf_rqs[]
accesses, let's keep this locking.
So better withdraw from changing ufshcd_tmc_handler() and just leave
the whole function as it is?
That sounds good to me.
Thanks,
Bart.