scsi: be2iscsi: Add checks to validate completions
authorJitendra Bhivare <jitendra.bhivare@broadcom.com>
Tue, 13 Dec 2016 10:25:58 +0000 (15:55 +0530)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 5 Jan 2017 05:21:13 +0000 (00:21 -0500)
commit3f7f62ee5b10de42b3ff1a33599fde4a2094960a
treed2e7b2bfcef7dbe0a74c3d67ee940f7015dcba35
parent392b7d2f122210da594671606321223167a5a85c
scsi: be2iscsi: Add checks to validate completions

Added check in beiscsi_process_cq for pio_handle.
pio_handle is cleared in beiscsi_put_wrb_handle.
This catches any case where task gets cleaned up just before completion.

Use back_lock before accessing pio_handle.

Signed-off-by: Jitendra Bhivare <jitendra.bhivare@broadcom.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/be2iscsi/be_main.c