scsi: libfc: safeguard against invalid exchange index
authorHannes Reinecke <hare@suse.de>
Thu, 13 Oct 2016 13:10:49 +0000 (15:10 +0200)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 8 Nov 2016 22:29:52 +0000 (17:29 -0500)
commitb73aa56ee91cd88a4977033cfd2a18d6b25dddde
treed2f0d144aeb58278b397509973f0f3ddc7f62323
parent5d339d163a541ceb13074789ac2f8c35b11ebda9
scsi: libfc: safeguard against invalid exchange index

The cached exchange index might be invalid, in which case
we should drop down to allocate a new one.
And we should not try to access an invalid exchange when
responding to a BA_ABTS.

Signed-off-by: Hannes Reinecke <hare@suse.com>
Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/libfc/fc_exch.c