Commit 68ff2959 authored by Fred Herard's avatar Fred Herard Committed by Juerg Haefliger

scsi: libiscsi: Fix NULL pointer dereference in iscsi_eh_session_reset

BugLink: https://bugs.launchpad.net/bugs/1811252

[ Upstream commit 5db6dd14 ]

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: default avatarFred Herard <fred.herard@oracle.com>
Reviewed-by: default avatarKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reviewed-by: default avatarLee Duncan <lduncan@suse.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarJuerg Haefliger <juergh@canonical.com>
Signed-off-by: default avatarStefan Bader <stefan.bader@canonical.com>
parent 192418e1
...@@ -2393,8 +2393,8 @@ int iscsi_eh_session_reset(struct scsi_cmnd *sc) ...@@ -2393,8 +2393,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->lock); spin_unlock_bh(&session->lock);
mutex_unlock(&session->eh_mutex); mutex_unlock(&session->eh_mutex);
return FAILED; return FAILED;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment