scsi: libiscsi: Fix NULL pointer dereference in iscsi_eh_session_reset
authorFred Herard <fred.herard@oracle.com>
Wed, 21 Nov 2018 01:22:45 +0000 (20:22 -0500)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 28 Nov 2018 23:38:22 +0000 (18:38 -0500)
commit5db6dd14b31397e8cccaaddab2ff44ebec1acf25
tree819ff1cab97237822f127563ae5e2d60dd83abea
parentdfb7513374c1f8e7cd595106fbdba3fd07ebaf30
scsi: libiscsi: Fix NULL pointer dereference in iscsi_eh_session_reset

This commit addresses NULL pointer dereference in iscsi_eh_session_reset.
Reference should not be made to session->leadconn when session->state is
set to ISCSI_STATE_TERMINATE.

Signed-off-by: Fred Herard <fred.herard@oracle.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reviewed-by: Lee Duncan <lduncan@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/libiscsi.c