Re: [EXT] Re: [PATCH v2 1/5] scsi; ufs: add device descriptor for Host Performance Booster

From: Bart Van Assche
Date: Thu Apr 23 2020 - 13:57:26 EST


On 4/23/20 4:01 AM, Bean Huo (beanhuo) wrote:
Thanks your review, I will take your suggestions in next version development.

Hi Bean,

Please make sure that the issues raised by Christoph are addressed before reposting this series.

Additionally, I think the following two call chains are deadlock-prone and should be addressed:

ufshcd_queuecommand()
-> ufshcd_comp_scsi_upiu()
-> ufshpb_prep_fn()
-> schedule_work(&hpb->ufshpb_req_work)
-> ufshpb_req_workq_fn()
-> ufshpb_subregion_activate()
-> ufshpb_subregion_l2p_load()
-> ufshpb_l2p_load_req()
-> blk_execute_rq_nowait()

ufshcd_queuecommand()
-> ufshcd_comp_scsi_upiu()
-> ufshpb_prep_fn()
-> schedule_work(&hpb->ufshpb_req_work)
-> ufshpb_req_workq_fn()
-> ufshpb_subregion_activate()
-> ufshpb_region_deactivate()
-> ufshpb_execute_cmd()
-> scsi_execute()

I don't know any other block or SCSI driver that calls blk_execute_rq*() or scsi_execute() from inside its .queue_rq() callback to queue requests onto the same request queue (the device mapper requeues requests onto a lower level request queue).

Thanks,

Bart.