mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-21 12:41:26 +00:00
[PATCH] Session reference count logic error in Qlogic target
When double session is found in q2t_create_sess the session object is updated, but after exiting from the function, if the session is not NULL the reference counter is decrement, become zero and then the session is deleted. As done while making a local session we need here to increment the reference count by calling to q2t_sess_get, because at exiting we call to q2t_sess_put. Signed-off-by: Gal Rosen <galr@storwize.com> git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1798 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -574,6 +574,7 @@ static struct q2t_sess *q2t_create_sess(scsi_qla_host_t *ha, fc_port_t *fcport,
|
||||
sess->deleted = 0;
|
||||
}
|
||||
|
||||
q2t_sess_get(sess);
|
||||
sess->s_id = fcport->d_id;
|
||||
sess->loop_id = fcport->loop_id;
|
||||
sess->conf_compl_supported = fcport->conf_compl_supported;
|
||||
|
||||
Reference in New Issue
Block a user