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>
This commit is contained in:
parent
dfb7513374
commit
5db6dd14b3
@ -2416,8 +2416,8 @@ int iscsi_eh_session_reset(struct scsi_cmnd *sc)
|
|||||||
failed:
|
failed:
|
||||||
ISCSI_DBG_EH(session,
|
ISCSI_DBG_EH(session,
|
||||||
"failing session reset: Could not log back into "
|
"failing session reset: Could not log back into "
|
||||||
"%s, %s [age %d]\n", session->targetname,
|
"%s [age %d]\n", session->targetname,
|
||||||
conn->persistent_address, session->age);
|
session->age);
|
||||||
spin_unlock_bh(&session->frwd_lock);
|
spin_unlock_bh(&session->frwd_lock);
|
||||||
mutex_unlock(&session->eh_mutex);
|
mutex_unlock(&session->eh_mutex);
|
||||||
return FAILED;
|
return FAILED;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user