scsi: qla2xxx: Protect access to qpair members with qpair->qp_lock
authorJohannes Thumshirn <jthumshirn@suse.de>
Fri, 23 Jun 2017 07:10:11 +0000 (09:10 +0200)
committerMartin K. Petersen <martin.petersen@oracle.com>
Sat, 1 Jul 2017 20:49:27 +0000 (16:49 -0400)
commit578079fab3f89eda73d7f3bb3bdfdf650ab1b8ec
tree806db1510aab23d715e98a024dde42b680de6256
parentf62f9ffdb5ef683ef8cffb43932fa72cc3713e94
scsi: qla2xxx: Protect access to qpair members with qpair->qp_lock

In qla2xx_start_scsi_mq() and qla2xx_dif_start_scsi_mq() we grab the
qpair->qp_lock but do access members of the qpair before having the lock.
Re-order the locking sequence to have all read and write access to qpair
members under the qpair->qp_lock.

Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
Acked-by: Himanshu Madhani <himanshu.madhani@cavium.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/qla2xxx/qla_iocb.c