]> rtime.felk.cvut.cz Git - zynq/linux.git/commit
scsi: qla2xxx: Fixup locking for session deletion
authorHannes Reinecke <hare@suse.de>
Thu, 22 Feb 2018 08:49:35 +0000 (09:49 +0100)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 2 Mar 2018 01:16:50 +0000 (20:16 -0500)
commit1c6cacf4ea6c04a58a0e3057f5ed60c24a4ffeff
tree63796fdf986b01e35d7c872c83657e7873a2dd11
parent1514839b366417934e2f1328edb50ed1e8a719f5
scsi: qla2xxx: Fixup locking for session deletion

Commit d8630bb95f46 ('Serialize session deletion by using work_lock')
tries to fixup a deadlock when deleting sessions, but fails to take into
account the locking rules. This patch resolves the situation by
introducing a separate lock for processing the GNLIST response, and
ensures that sess_lock is released before calling
qlt_schedule_sess_delete().

Cc: Himanshu Madhani <himanshu.madhani@cavium.com>
Cc: Quinn Tran <quinn.tran@cavium.com>
Fixes: d8630bb95f46 ("scsi: qla2xxx: Serialize session deletion by using work_lock")
Signed-off-by: Hannes Reinecke <hare@suse.com>
Acked-by: Himanshu Madhani <himanshu.madhani@cavium.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/qla2xxx/qla_def.h
drivers/scsi/qla2xxx/qla_init.c
drivers/scsi/qla2xxx/qla_os.c
drivers/scsi/qla2xxx/qla_target.c