summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/ufs/ufs-qcom.c
diff options
context:
space:
mode:
authorSubhash Jadavani <subhashj@codeaurora.org>2018-05-03 13:07:18 +0200
committerMartin K. Petersen <martin.petersen@oracle.com>2018-05-18 18:20:48 +0200
commit38135535dcc25af856336fda31aeef79d8ad9dab (patch)
tree8e1b74cad3a3f72ba6aec9f9b98d1ac9be5faff9 /drivers/scsi/ufs/ufs-qcom.c
parentscsi: ufs: ufshcd: fix possible unclocked register access (diff)
downloadlinux-38135535dcc25af856336fda31aeef79d8ad9dab.tar.xz
linux-38135535dcc25af856336fda31aeef79d8ad9dab.zip
scsi: ufs: add reference counting for scsi block requests
Currently we call the scsi_block_requests()/scsi_unblock_requests() whenever we want to block/unblock scsi requests but as there is no reference counting, nesting of these calls could leave us in undesired state sometime. Consider following call flow sequence: 1. func1() calls scsi_block_requests() but calls func2() before calling scsi_unblock_requests() 2. func2() calls scsi_block_requests() 3. func2() calls scsi_unblock_requests() 4. func1() calls scsi_unblock_requests() As there is no reference counting, we will have scsi requests unblocked after #3 instead of it to be unblocked only after #4. Though we may not have failures seen with this, we might run into some failures in future. Better solution would be to fix this by adding reference counting. Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org> Signed-off-by: Can Guo <cang@codeaurora.org> Signed-off-by: Asutosh Das <asutoshd@codeaurora.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/ufs/ufs-qcom.c')
0 files changed, 0 insertions, 0 deletions